aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/generic/setup_tx4938.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/txx9/generic/setup_tx4938.c')
-rw-r--r--arch/mips/txx9/generic/setup_tx4938.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup_tx4938.c b/arch/mips/txx9/generic/setup_tx4938.c
index 95c058f0a96c..630a7aac61f6 100644
--- a/arch/mips/txx9/generic/setup_tx4938.c
+++ b/arch/mips/txx9/generic/setup_tx4938.c
@@ -14,6 +14,7 @@
14#include <linux/ioport.h> 14#include <linux/ioport.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/param.h> 16#include <linux/param.h>
17#include <linux/mtd/physmap.h>
17#include <asm/txx9irq.h> 18#include <asm/txx9irq.h>
18#include <asm/txx9tmr.h> 19#include <asm/txx9tmr.h>
19#include <asm/txx9pio.h> 20#include <asm/txx9pio.h>
@@ -269,3 +270,16 @@ void __init tx4938_ethaddr_init(unsigned char *addr0, unsigned char *addr1)
269 if (addr1 && (pcfg & TX4938_PCFG_ETH1_SEL)) 270 if (addr1 && (pcfg & TX4938_PCFG_ETH1_SEL))
270 txx9_ethaddr_init(TXX9_IRQ_BASE + TX4938_IR_ETH1, addr1); 271 txx9_ethaddr_init(TXX9_IRQ_BASE + TX4938_IR_ETH1, addr1);
271} 272}
273
274void __init tx4938_mtd_init(int ch)
275{
276 struct physmap_flash_data pdata = {
277 .width = TX4938_EBUSC_WIDTH(ch) / 8,
278 };
279 unsigned long start = txx9_ce_res[ch].start;
280 unsigned long size = txx9_ce_res[ch].end - start + 1;
281
282 if (!(TX4938_EBUSC_CR(ch) & 0x8))
283 return; /* disabled */
284 txx9_physmap_flash_init(ch, start, size, &pdata);
285}