aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/board.h
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2018-05-14 11:14:21 -0700
committerJohn Crispin <john@phrozen.org>2018-05-15 06:44:48 +0200
commit2d401925b9bdf34de800fff57f593a3665de2a6a (patch)
treef3a8edd70afe6044fac02512e96b7506e1938e69 /target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/board.h
parent50913b77e46738547c10719d45f7ef11ab46b865 (diff)
downloadupstream-2d401925b9bdf34de800fff57f593a3665de2a6a.tar.gz
upstream-2d401925b9bdf34de800fff57f593a3665de2a6a.tar.bz2
upstream-2d401925b9bdf34de800fff57f593a3665de2a6a.zip
ramips: mmc: Sync with staging drivers
Mostly whitespace cleanups. Some unneeded code was removed. MMC init was also moved to the probe function as in 6069bdd0871a20b5adce8d2f677946e05a2da609 The cleanup commits are over 100, making it hard to do them individually. Tested on GnuBee PC1 with an SD card being used as swap. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/board.h')
-rw-r--r--target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/board.h82
1 files changed, 4 insertions, 78 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/board.h b/target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/board.h
index 33bfc7b959..a7d82f321b 100644
--- a/target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/board.h
+++ b/target/linux/ramips/files-4.14/drivers/mmc/host/mtk-mmc/board.h
@@ -36,27 +36,10 @@
#ifndef __ARCH_ARM_MACH_BOARD_H
#define __ARCH_ARM_MACH_BOARD_H
-#include <generated/autoconf.h>
-#include <linux/pm.h>
-/* --- chhung */
-// #include <mach/mt6575.h>
-// #include <board-custom.h>
-/* end of chhung */
-
-typedef void (*sdio_irq_handler_t)(void*); /* external irq handler */
-typedef void (*pm_callback_t)(pm_message_t state, void *data);
-
#define MSDC_CD_PIN_EN (1 << 0) /* card detection pin is wired */
#define MSDC_WP_PIN_EN (1 << 1) /* write protection pin is wired */
#define MSDC_RST_PIN_EN (1 << 2) /* emmc reset pin is wired */
-#define MSDC_SDIO_IRQ (1 << 3) /* use internal sdio irq (bus) */
-#define MSDC_EXT_SDIO_IRQ (1 << 4) /* use external sdio irq */
#define MSDC_REMOVABLE (1 << 5) /* removable slot */
-#define MSDC_SYS_SUSPEND (1 << 6) /* suspended by system */
-#define MSDC_HIGHSPEED (1 << 7) /* high-speed mode support */
-#define MSDC_UHS1 (1 << 8) /* uhs-1 mode support */
-#define MSDC_DDR (1 << 9) /* ddr mode support */
-
#define MSDC_SMPL_RISING (0)
#define MSDC_SMPL_FALLING (1)
@@ -67,71 +50,14 @@ typedef void (*pm_callback_t)(pm_message_t state, void *data);
#define MSDC_WP_PIN (3)
#define MSDC_RST_PIN (4)
-enum {
- MSDC_CLKSRC_48MHZ = 0,
-// MSDC_CLKSRC_26MHZ = 0,
-// MSDC_CLKSRC_197MHZ = 1,
-// MSDC_CLKSRC_208MHZ = 2
-};
-
struct msdc_hw {
- unsigned char clk_src; /* host clock source */
- unsigned char cmd_edge; /* command latch edge */
- unsigned char data_edge; /* data latch edge */
- unsigned char clk_drv; /* clock pad driving */
- unsigned char cmd_drv; /* command pad driving */
- unsigned char dat_drv; /* data pad driving */
- unsigned long flags; /* hardware capability flags */
- unsigned long data_pins; /* data pins */
- unsigned long data_offset; /* data address offset */
-
- /* config gpio pull mode */
- void (*config_gpio_pin)(int type, int pull);
-
- /* external power control for card */
- void (*ext_power_on)(void);
- void (*ext_power_off)(void);
+ unsigned char clk_src; /* host clock source */
+ unsigned long flags; /* hardware capability flags */
- /* external sdio irq operations */
- void (*request_sdio_eirq)(sdio_irq_handler_t sdio_irq_handler, void *data);
- void (*enable_sdio_eirq)(void);
- void (*disable_sdio_eirq)(void);
-
- /* external cd irq operations */
- void (*request_cd_eirq)(sdio_irq_handler_t cd_irq_handler, void *data);
- void (*enable_cd_eirq)(void);
- void (*disable_cd_eirq)(void);
- int (*get_cd_status)(void);
-
- /* power management callback for external module */
- void (*register_pm)(pm_callback_t pm_cb, void *data);
+ /* config gpio pull mode */
+ void (*config_gpio_pin)(int type, int pull);
};
extern struct msdc_hw msdc0_hw;
-extern struct msdc_hw msdc1_hw;
-extern struct msdc_hw msdc2_hw;
-extern struct msdc_hw msdc3_hw;
-
-/*GPS driver*/
-#define GPS_FLAG_FORCE_OFF 0x0001
-struct mt3326_gps_hardware {
- int (*ext_power_on)(int);
- int (*ext_power_off)(int);
-};
-extern struct mt3326_gps_hardware mt3326_gps_hw;
-
-/* NAND driver */
-struct mt6575_nand_host_hw {
- unsigned int nfi_bus_width; /* NFI_BUS_WIDTH */
- unsigned int nfi_access_timing; /* NFI_ACCESS_TIMING */
- unsigned int nfi_cs_num; /* NFI_CS_NUM */
- unsigned int nand_sec_size; /* NAND_SECTOR_SIZE */
- unsigned int nand_sec_shift; /* NAND_SECTOR_SHIFT */
- unsigned int nand_ecc_size;
- unsigned int nand_ecc_bytes;
- unsigned int nand_ecc_mode;
-};
-extern struct mt6575_nand_host_hw mt6575_nand_hw;
#endif /* __ARCH_ARM_MACH_BOARD_H */
-