diff options
Diffstat (limited to 'arch/mips/alchemy/devboards/db1x00')
-rw-r--r-- | arch/mips/alchemy/devboards/db1x00/platform.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/mips/alchemy/devboards/db1x00/platform.c b/arch/mips/alchemy/devboards/db1x00/platform.c index 0ac5dd05d3c0..62e2a96fe119 100644 --- a/arch/mips/alchemy/devboards/db1x00/platform.c +++ b/arch/mips/alchemy/devboards/db1x00/platform.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | 23 | ||
24 | #include <asm/mach-au1x00/au1xxx.h> | 24 | #include <asm/mach-au1x00/au1xxx.h> |
25 | #include <asm/mach-db1x00/bcsr.h> | ||
25 | #include "../platform.h" | 26 | #include "../platform.h" |
26 | 27 | ||
27 | /* DB1xxx PCMCIA interrupt sources: | 28 | /* DB1xxx PCMCIA interrupt sources: |
@@ -32,6 +33,7 @@ | |||
32 | */ | 33 | */ |
33 | 34 | ||
34 | #define DB1XXX_HAS_PCMCIA | 35 | #define DB1XXX_HAS_PCMCIA |
36 | #define F_SWAPPED (bcsr_read(BCSR_STATUS) & BCSR_STATUS_DB1000_SWAPBOOT) | ||
35 | 37 | ||
36 | #if defined(CONFIG_MIPS_DB1000) | 38 | #if defined(CONFIG_MIPS_DB1000) |
37 | #define DB1XXX_PCMCIA_CD0 AU1000_GPIO0_INT | 39 | #define DB1XXX_PCMCIA_CD0 AU1000_GPIO0_INT |
@@ -40,6 +42,8 @@ | |||
40 | #define DB1XXX_PCMCIA_CD1 AU1000_GPIO3_INT | 42 | #define DB1XXX_PCMCIA_CD1 AU1000_GPIO3_INT |
41 | #define DB1XXX_PCMCIA_STSCHG1 AU1000_GPIO4_INT | 43 | #define DB1XXX_PCMCIA_STSCHG1 AU1000_GPIO4_INT |
42 | #define DB1XXX_PCMCIA_CARD1 AU1000_GPIO5_INT | 44 | #define DB1XXX_PCMCIA_CARD1 AU1000_GPIO5_INT |
45 | #define BOARD_FLASH_SIZE 0x02000000 /* 32MB */ | ||
46 | #define BOARD_FLASH_WIDTH 4 /* 32-bits */ | ||
43 | #elif defined(CONFIG_MIPS_DB1100) | 47 | #elif defined(CONFIG_MIPS_DB1100) |
44 | #define DB1XXX_PCMCIA_CD0 AU1100_GPIO0_INT | 48 | #define DB1XXX_PCMCIA_CD0 AU1100_GPIO0_INT |
45 | #define DB1XXX_PCMCIA_STSCHG0 AU1100_GPIO1_INT | 49 | #define DB1XXX_PCMCIA_STSCHG0 AU1100_GPIO1_INT |
@@ -47,6 +51,8 @@ | |||
47 | #define DB1XXX_PCMCIA_CD1 AU1100_GPIO3_INT | 51 | #define DB1XXX_PCMCIA_CD1 AU1100_GPIO3_INT |
48 | #define DB1XXX_PCMCIA_STSCHG1 AU1100_GPIO4_INT | 52 | #define DB1XXX_PCMCIA_STSCHG1 AU1100_GPIO4_INT |
49 | #define DB1XXX_PCMCIA_CARD1 AU1100_GPIO5_INT | 53 | #define DB1XXX_PCMCIA_CARD1 AU1100_GPIO5_INT |
54 | #define BOARD_FLASH_SIZE 0x02000000 /* 32MB */ | ||
55 | #define BOARD_FLASH_WIDTH 4 /* 32-bits */ | ||
50 | #elif defined(CONFIG_MIPS_DB1500) | 56 | #elif defined(CONFIG_MIPS_DB1500) |
51 | #define DB1XXX_PCMCIA_CD0 AU1500_GPIO0_INT | 57 | #define DB1XXX_PCMCIA_CD0 AU1500_GPIO0_INT |
52 | #define DB1XXX_PCMCIA_STSCHG0 AU1500_GPIO1_INT | 58 | #define DB1XXX_PCMCIA_STSCHG0 AU1500_GPIO1_INT |
@@ -54,6 +60,8 @@ | |||
54 | #define DB1XXX_PCMCIA_CD1 AU1500_GPIO3_INT | 60 | #define DB1XXX_PCMCIA_CD1 AU1500_GPIO3_INT |
55 | #define DB1XXX_PCMCIA_STSCHG1 AU1500_GPIO4_INT | 61 | #define DB1XXX_PCMCIA_STSCHG1 AU1500_GPIO4_INT |
56 | #define DB1XXX_PCMCIA_CARD1 AU1500_GPIO5_INT | 62 | #define DB1XXX_PCMCIA_CARD1 AU1500_GPIO5_INT |
63 | #define BOARD_FLASH_SIZE 0x02000000 /* 32MB */ | ||
64 | #define BOARD_FLASH_WIDTH 4 /* 32-bits */ | ||
57 | #elif defined(CONFIG_MIPS_DB1550) | 65 | #elif defined(CONFIG_MIPS_DB1550) |
58 | #define DB1XXX_PCMCIA_CD0 AU1550_GPIO0_INT | 66 | #define DB1XXX_PCMCIA_CD0 AU1550_GPIO0_INT |
59 | #define DB1XXX_PCMCIA_STSCHG0 AU1550_GPIO21_INT | 67 | #define DB1XXX_PCMCIA_STSCHG0 AU1550_GPIO21_INT |
@@ -61,9 +69,20 @@ | |||
61 | #define DB1XXX_PCMCIA_CD1 AU1550_GPIO1_INT | 69 | #define DB1XXX_PCMCIA_CD1 AU1550_GPIO1_INT |
62 | #define DB1XXX_PCMCIA_STSCHG1 AU1550_GPIO22_INT | 70 | #define DB1XXX_PCMCIA_STSCHG1 AU1550_GPIO22_INT |
63 | #define DB1XXX_PCMCIA_CARD1 AU1550_GPIO5_INT | 71 | #define DB1XXX_PCMCIA_CARD1 AU1550_GPIO5_INT |
72 | #define BOARD_FLASH_SIZE 0x08000000 /* 128MB */ | ||
73 | #define BOARD_FLASH_WIDTH 4 /* 32-bits */ | ||
64 | #else | 74 | #else |
65 | /* other board: no PCMCIA */ | 75 | /* other board: no PCMCIA */ |
66 | #undef DB1XXX_HAS_PCMCIA | 76 | #undef DB1XXX_HAS_PCMCIA |
77 | #undef F_SWAPPED | ||
78 | #define F_SWAPPED 0 | ||
79 | #if defined(CONFIG_MIPS_BOSPORUS) | ||
80 | #define BOARD_FLASH_SIZE 0x01000000 /* 16MB */ | ||
81 | #define BOARD_FLASH_WIDTH 2 /* 16-bits */ | ||
82 | #elif defined(CONFIG_MIPS_MIRAGE) | ||
83 | #define BOARD_FLASH_SIZE 0x04000000 /* 64MB */ | ||
84 | #define BOARD_FLASH_WIDTH 4 /* 32-bits */ | ||
85 | #endif | ||
67 | #endif | 86 | #endif |
68 | 87 | ||
69 | static int __init db1xxx_dev_init(void) | 88 | static int __init db1xxx_dev_init(void) |
@@ -93,6 +112,7 @@ static int __init db1xxx_dev_init(void) | |||
93 | 0, | 112 | 0, |
94 | 1); | 113 | 1); |
95 | #endif | 114 | #endif |
115 | db1x_register_norflash(BOARD_FLASH_SIZE, BOARD_FLASH_WIDTH, F_SWAPPED); | ||
96 | return 0; | 116 | return 0; |
97 | } | 117 | } |
98 | device_initcall(db1xxx_dev_init); | 118 | device_initcall(db1xxx_dev_init); |