aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2008-07-17 11:43:48 -0400
committerRalf Baechle <ralf@linux-mips.org>2008-07-20 09:38:19 -0400
commit8d795f2a5cf73338a467ac82bdeb73225e987c45 (patch)
tree050293df491ce1623d4c7dc5f5c21a0e4f7fcf84 /arch/mips
parent73b4390fb23456964201abda79f1210fe337d01a (diff)
[MIPS] TXx9: Miscellaneous build fixes
* Fix build if only RBTX4927 or RBTX4938 was selected. * Move gpio helpers to generic part. * Select SOC_TX4938 for RBTX4927/37 board. * Fix parent of rbtx4938_fpga_resource. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/txx9/Kconfig2
-rw-r--r--arch/mips/txx9/generic/setup.c20
-rw-r--r--arch/mips/txx9/rbtx4938/setup.c14
3 files changed, 23 insertions, 13 deletions
diff --git a/arch/mips/txx9/Kconfig b/arch/mips/txx9/Kconfig
index b92a134ef124..6de4c5aa92be 100644
--- a/arch/mips/txx9/Kconfig
+++ b/arch/mips/txx9/Kconfig
@@ -7,6 +7,8 @@ config TOSHIBA_RBTX4927
7 bool "Toshiba RBTX49[23]7 board" 7 bool "Toshiba RBTX49[23]7 board"
8 depends on MACH_TX49XX 8 depends on MACH_TX49XX
9 select SOC_TX4927 9 select SOC_TX4927
10 # TX4937 is subset of TX4938
11 select SOC_TX4938
10 help 12 help
11 This Toshiba board is based on the TX4927 processor. Say Y here to 13 This Toshiba board is based on the TX4927 processor. Say Y here to
12 support this machine type 14 support this machine type
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 5afc5d5cab03..8caef07701bb 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -94,6 +94,22 @@ void clk_put(struct clk *clk)
94} 94}
95EXPORT_SYMBOL(clk_put); 95EXPORT_SYMBOL(clk_put);
96 96
97/* GPIO support */
98
99#ifdef CONFIG_GENERIC_GPIO
100int gpio_to_irq(unsigned gpio)
101{
102 return -EINVAL;
103}
104EXPORT_SYMBOL(gpio_to_irq);
105
106int irq_to_gpio(unsigned irq)
107{
108 return -EINVAL;
109}
110EXPORT_SYMBOL(irq_to_gpio);
111#endif
112
97extern struct txx9_board_vec jmr3927_vec; 113extern struct txx9_board_vec jmr3927_vec;
98extern struct txx9_board_vec rbtx4927_vec; 114extern struct txx9_board_vec rbtx4927_vec;
99extern struct txx9_board_vec rbtx4937_vec; 115extern struct txx9_board_vec rbtx4937_vec;
@@ -126,15 +142,19 @@ void __init prom_init(void)
126#endif 142#endif
127#ifdef CONFIG_CPU_TX49XX 143#ifdef CONFIG_CPU_TX49XX
128 switch (TX4938_REV_PCODE()) { 144 switch (TX4938_REV_PCODE()) {
145#ifdef CONFIG_TOSHIBA_RBTX4927
129 case 0x4927: 146 case 0x4927:
130 txx9_board_vec = &rbtx4927_vec; 147 txx9_board_vec = &rbtx4927_vec;
131 break; 148 break;
132 case 0x4937: 149 case 0x4937:
133 txx9_board_vec = &rbtx4937_vec; 150 txx9_board_vec = &rbtx4937_vec;
134 break; 151 break;
152#endif
153#ifdef CONFIG_TOSHIBA_RBTX4938
135 case 0x4938: 154 case 0x4938:
136 txx9_board_vec = &rbtx4938_vec; 155 txx9_board_vec = &rbtx4938_vec;
137 break; 156 break;
157#endif
138 } 158 }
139#endif 159#endif
140 160
diff --git a/arch/mips/txx9/rbtx4938/setup.c b/arch/mips/txx9/rbtx4938/setup.c
index aaa987ae0f83..c2da92396b7a 100644
--- a/arch/mips/txx9/rbtx4938/setup.c
+++ b/arch/mips/txx9/rbtx4938/setup.c
@@ -457,7 +457,7 @@ static void __init rbtx4938_mem_setup(void)
457 rbtx4938_fpga_resource.start = CPHYSADDR(RBTX4938_FPGA_REG_ADDR); 457 rbtx4938_fpga_resource.start = CPHYSADDR(RBTX4938_FPGA_REG_ADDR);
458 rbtx4938_fpga_resource.end = CPHYSADDR(RBTX4938_FPGA_REG_ADDR) + 0xffff; 458 rbtx4938_fpga_resource.end = CPHYSADDR(RBTX4938_FPGA_REG_ADDR) + 0xffff;
459 rbtx4938_fpga_resource.flags = IORESOURCE_MEM | IORESOURCE_BUSY; 459 rbtx4938_fpga_resource.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
460 if (request_resource(&iomem_resource, &rbtx4938_fpga_resource)) 460 if (request_resource(&txx9_ce_res[2], &rbtx4938_fpga_resource))
461 printk("request resource for fpga failed\n"); 461 printk("request resource for fpga failed\n");
462 462
463 _machine_restart = rbtx4938_machine_restart; 463 _machine_restart = rbtx4938_machine_restart;
@@ -488,18 +488,6 @@ static int __init rbtx4938_ne_init(void)
488 return IS_ERR(dev) ? PTR_ERR(dev) : 0; 488 return IS_ERR(dev) ? PTR_ERR(dev) : 0;
489} 489}
490 490
491/* GPIO support */
492
493int gpio_to_irq(unsigned gpio)
494{
495 return -EINVAL;
496}
497
498int irq_to_gpio(unsigned irq)
499{
500 return -EINVAL;
501}
502
503static DEFINE_SPINLOCK(rbtx4938_spi_gpio_lock); 491static DEFINE_SPINLOCK(rbtx4938_spi_gpio_lock);
504 492
505static void rbtx4938_spi_gpio_set(struct gpio_chip *chip, unsigned int offset, 493static void rbtx4938_spi_gpio_set(struct gpio_chip *chip, unsigned int offset,