13 #include <linux/types.h>
20 #include <asm/reboot.h>
29 static void rbtx4938_machine_restart(
char *
command)
39 static void __init rbtx4938_pci_setup(
void)
110 #define SEEPROM1_CS 7
111 #define SEEPROM2_CS 0
112 #define SEEPROM3_CS 1
116 static int __init rbtx4938_ethaddr_init(
void)
119 unsigned char dat[17];
128 if (
strcmp(dat,
"MAC") != 0)
130 for (i = 0, sum = 0; i <
sizeof(
dat); i++)
140 static void __init rbtx4938_spi_setup(
void)
146 static struct resource rbtx4938_fpga_resource;
148 static void __init rbtx4938_time_init(
void)
153 static void __init rbtx4938_mem_setup(
void)
155 unsigned long long pcfg;
171 #ifdef CONFIG_TOSHIBA_RBTX4938_MPLEX_PIO58_61
172 pr_info(
"PIOSEL: disabling both ATA and NAND selection\n");
177 #ifdef CONFIG_TOSHIBA_RBTX4938_MPLEX_NAND
178 pr_info(
"PIOSEL: enabling NAND selection\n");
183 #ifdef CONFIG_TOSHIBA_RBTX4938_MPLEX_ATA
184 pr_info(
"PIOSEL: enabling ATA selection\n");
189 #ifdef CONFIG_TOSHIBA_RBTX4938_MPLEX_KEEP
191 pr_info(
"PIOSEL: NAND %s, ATA %s\n",
196 rbtx4938_spi_setup();
211 rbtx4938_fpga_resource.name =
"FPGA Registers";
226 static void __init rbtx4938_ne_init(
void)
238 platform_device_register_simple(
"ne", -1, res,
ARRAY_SIZE(res));
243 static void rbtx4938_spi_gpio_set(
struct gpio_chip *
chip,
unsigned int offset,
256 spin_unlock_irqrestore(&rbtx4938_spi_gpio_lock, flags);
259 static int rbtx4938_spi_gpio_dir_out(
struct gpio_chip *chip,
260 unsigned int offset,
int value)
262 rbtx4938_spi_gpio_set(chip, offset, value);
266 static struct gpio_chip rbtx4938_spi_gpio_chip = {
267 .set = rbtx4938_spi_gpio_set,
268 .direction_output = rbtx4938_spi_gpio_dir_out,
269 .label =
"RBTX4938-SPICS",
274 static int __init rbtx4938_spi_init(
void)
278 .max_speed_hz = 1000000,
300 static void __init rbtx4938_mtd_init(
void)
336 static void __init rbtx4938_arch_init(
void)
339 rbtx4938_pci_setup();
343 static void __init rbtx4938_device_init(
void)
345 rbtx4938_ethaddr_init();
354 platform_device_register_simple(
"txx9aclc-generic", -1,
NULL, 0);
360 .system =
"Toshiba RBTX4938",
362 .mem_setup = rbtx4938_mem_setup,
364 .time_init = rbtx4938_time_init,
365 .device_init = rbtx4938_device_init,
366 .arch_init = rbtx4938_arch_init,