diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2008-08-19 09:55:11 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-10-11 11:18:42 -0400 |
commit | 51f607c76e1e7bd089dcad97b6b0a58649be06a3 (patch) | |
tree | bcf9389a1e3bcd347d7c560163d2c014d804a162 /include/asm-mips/txx9 | |
parent | c7b95bcb38ea492fd025008ef99501a2b90aa237 (diff) |
MIPS: TXx9: Add mtd support
Add helper routines to register physmap-flash platform devices for NOR
flashes.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/txx9')
-rw-r--r-- | include/asm-mips/txx9/generic.h | 4 | ||||
-rw-r--r-- | include/asm-mips/txx9/tx3927.h | 2 | ||||
-rw-r--r-- | include/asm-mips/txx9/tx4927.h | 3 | ||||
-rw-r--r-- | include/asm-mips/txx9/tx4938.h | 2 |
4 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-mips/txx9/generic.h b/include/asm-mips/txx9/generic.h index 0a225bf73496..1982c4437b1d 100644 --- a/include/asm-mips/txx9/generic.h +++ b/include/asm-mips/txx9/generic.h | |||
@@ -59,4 +59,8 @@ static inline void txx9_sio_putchar_init(unsigned long baseaddr) | |||
59 | } | 59 | } |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | struct physmap_flash_data; | ||
63 | void txx9_physmap_flash_init(int no, unsigned long addr, unsigned long size, | ||
64 | const struct physmap_flash_data *pdata); | ||
65 | |||
62 | #endif /* __ASM_TXX9_GENERIC_H */ | 66 | #endif /* __ASM_TXX9_GENERIC_H */ |
diff --git a/include/asm-mips/txx9/tx3927.h b/include/asm-mips/txx9/tx3927.h index 587deb9592d2..dc30c8d42061 100644 --- a/include/asm-mips/txx9/tx3927.h +++ b/include/asm-mips/txx9/tx3927.h | |||
@@ -325,6 +325,7 @@ struct tx3927_ccfg_reg { | |||
325 | #define TX3927_ROMC_BA(ch) (tx3927_romcptr->cr[(ch)] & 0xfff00000) | 325 | #define TX3927_ROMC_BA(ch) (tx3927_romcptr->cr[(ch)] & 0xfff00000) |
326 | #define TX3927_ROMC_SIZE(ch) \ | 326 | #define TX3927_ROMC_SIZE(ch) \ |
327 | (0x00100000 << ((tx3927_romcptr->cr[(ch)] >> 8) & 0xf)) | 327 | (0x00100000 << ((tx3927_romcptr->cr[(ch)] >> 8) & 0xf)) |
328 | #define TX3927_ROMC_WIDTH(ch) (32 >> ((tx3927_romcptr->cr[(ch)] >> 7) & 0x1)) | ||
328 | 329 | ||
329 | void tx3927_wdt_init(void); | 330 | void tx3927_wdt_init(void); |
330 | void tx3927_setup(void); | 331 | void tx3927_setup(void); |
@@ -335,5 +336,6 @@ void tx3927_pcic_setup(struct pci_controller *channel, | |||
335 | unsigned long sdram_size, int extarb); | 336 | unsigned long sdram_size, int extarb); |
336 | void tx3927_setup_pcierr_irq(void); | 337 | void tx3927_setup_pcierr_irq(void); |
337 | void tx3927_irq_init(void); | 338 | void tx3927_irq_init(void); |
339 | void tx3927_mtd_init(int ch); | ||
338 | 340 | ||
339 | #endif /* __ASM_TXX9_TX3927_H */ | 341 | #endif /* __ASM_TXX9_TX3927_H */ |
diff --git a/include/asm-mips/txx9/tx4927.h b/include/asm-mips/txx9/tx4927.h index 195f6515db9a..36a9241b0cac 100644 --- a/include/asm-mips/txx9/tx4927.h +++ b/include/asm-mips/txx9/tx4927.h | |||
@@ -196,6 +196,8 @@ struct tx4927_ccfg_reg { | |||
196 | #define TX4927_EBUSC_BA(ch) ((TX4927_EBUSC_CR(ch) >> 48) << 20) | 196 | #define TX4927_EBUSC_BA(ch) ((TX4927_EBUSC_CR(ch) >> 48) << 20) |
197 | #define TX4927_EBUSC_SIZE(ch) \ | 197 | #define TX4927_EBUSC_SIZE(ch) \ |
198 | (0x00100000 << ((unsigned long)(TX4927_EBUSC_CR(ch) >> 8) & 0xf)) | 198 | (0x00100000 << ((unsigned long)(TX4927_EBUSC_CR(ch) >> 8) & 0xf)) |
199 | #define TX4927_EBUSC_WIDTH(ch) \ | ||
200 | (64 >> ((__u32)(TX4927_EBUSC_CR(ch) >> 20) & 0x3)) | ||
199 | 201 | ||
200 | /* utilities */ | 202 | /* utilities */ |
201 | static inline void txx9_clear64(__u64 __iomem *adr, __u64 bits) | 203 | static inline void txx9_clear64(__u64 __iomem *adr, __u64 bits) |
@@ -251,5 +253,6 @@ int tx4927_report_pciclk(void); | |||
251 | int tx4927_pciclk66_setup(void); | 253 | int tx4927_pciclk66_setup(void); |
252 | void tx4927_setup_pcierr_irq(void); | 254 | void tx4927_setup_pcierr_irq(void); |
253 | void tx4927_irq_init(void); | 255 | void tx4927_irq_init(void); |
256 | void tx4927_mtd_init(int ch); | ||
254 | 257 | ||
255 | #endif /* __ASM_TXX9_TX4927_H */ | 258 | #endif /* __ASM_TXX9_TX4927_H */ |
diff --git a/include/asm-mips/txx9/tx4938.h b/include/asm-mips/txx9/tx4938.h index 8175d4ccbc39..989e7751135a 100644 --- a/include/asm-mips/txx9/tx4938.h +++ b/include/asm-mips/txx9/tx4938.h | |||
@@ -274,6 +274,7 @@ struct tx4938_ccfg_reg { | |||
274 | #define TX4938_EBUSC_CR(ch) TX4927_EBUSC_CR(ch) | 274 | #define TX4938_EBUSC_CR(ch) TX4927_EBUSC_CR(ch) |
275 | #define TX4938_EBUSC_BA(ch) TX4927_EBUSC_BA(ch) | 275 | #define TX4938_EBUSC_BA(ch) TX4927_EBUSC_BA(ch) |
276 | #define TX4938_EBUSC_SIZE(ch) TX4927_EBUSC_SIZE(ch) | 276 | #define TX4938_EBUSC_SIZE(ch) TX4927_EBUSC_SIZE(ch) |
277 | #define TX4938_EBUSC_WIDTH(ch) TX4927_EBUSC_WIDTH(ch) | ||
277 | 278 | ||
278 | #define tx4938_get_mem_size() tx4927_get_mem_size() | 279 | #define tx4938_get_mem_size() tx4927_get_mem_size() |
279 | void tx4938_wdt_init(void); | 280 | void tx4938_wdt_init(void); |
@@ -289,5 +290,6 @@ struct pci_dev; | |||
289 | int tx4938_pcic1_map_irq(const struct pci_dev *dev, u8 slot); | 290 | int tx4938_pcic1_map_irq(const struct pci_dev *dev, u8 slot); |
290 | void tx4938_setup_pcierr_irq(void); | 291 | void tx4938_setup_pcierr_irq(void); |
291 | void tx4938_irq_init(void); | 292 | void tx4938_irq_init(void); |
293 | void tx4938_mtd_init(int ch); | ||
292 | 294 | ||
293 | #endif | 295 | #endif |