aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/txx9/generic/setup_tx4927.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/txx9/generic/setup_tx4927.c')
-rw-r--r--arch/mips/txx9/generic/setup_tx4927.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup_tx4927.c b/arch/mips/txx9/generic/setup_tx4927.c
index e679c79a4b0f..0840ef930e40 100644
--- a/arch/mips/txx9/generic/setup_tx4927.c
+++ b/arch/mips/txx9/generic/setup_tx4927.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>
@@ -187,3 +188,16 @@ void __init tx4927_sio_init(unsigned int sclk, unsigned int cts_mask)
187 TXX9_IRQ_BASE + TX4927_IR_SIO(i), 188 TXX9_IRQ_BASE + TX4927_IR_SIO(i),
188 i, sclk, (1 << i) & cts_mask); 189 i, sclk, (1 << i) & cts_mask);
189} 190}
191
192void __init tx4927_mtd_init(int ch)
193{
194 struct physmap_flash_data pdata = {
195 .width = TX4927_EBUSC_WIDTH(ch) / 8,
196 };
197 unsigned long start = txx9_ce_res[ch].start;
198 unsigned long size = txx9_ce_res[ch].end - start + 1;
199
200 if (!(TX4927_EBUSC_CR(ch) & 0x8))
201 return; /* disabled */
202 txx9_physmap_flash_init(ch, start, size, &pdata);
203}