13 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
15 #include <linux/kernel.h>
23 #include <mach/hardware.h>
62 static void __init ts72xx_map_io(
void)
72 #define TS72XX_NAND_CONTROL_ADDR_LINE 22
73 #define TS72XX_NAND_BUSY_ADDR_LINE 23
75 static void ts72xx_nand_hwcontrol(
struct mtd_info *mtd,
98 static int ts72xx_nand_device_ready(
struct mtd_info *mtd)
108 #define TS72XX_BOOTROM_PART_SIZE (SZ_16K)
109 #define TS72XX_REDBOOT_PART_SIZE (SZ_2M + SZ_1M)
113 .name =
"TS-BOOTROM",
135 .partitions = ts72xx_nand_parts,
136 .nr_partitions =
ARRAY_SIZE(ts72xx_nand_parts),
139 .cmd_ctrl = ts72xx_nand_hwcontrol,
140 .dev_ready = ts72xx_nand_device_ready,
144 static struct resource ts72xx_nand_resource[] = {
155 .dev.platform_data = &ts72xx_nand_data,
156 .resource = ts72xx_nand_resource,
157 .num_resources =
ARRAY_SIZE(ts72xx_nand_resource),
161 static void __init ts72xx_register_flash(
void)
166 if (board_is_ts7200()) {
171 if (is_ts9420_installed())
177 ts72xx_nand_resource[0].
end = start +
SZ_16M - 1;
184 static unsigned char ts72xx_rtc_readbyte(
unsigned long addr)
190 static void ts72xx_rtc_writebyte(
unsigned char value,
unsigned long addr)
197 .readbyte = ts72xx_rtc_readbyte,
198 .writebyte = ts72xx_rtc_writebyte,
202 .name =
"rtc-m48t86",
205 .platform_data = &ts72xx_rtc_ops,
210 static struct resource ts72xx_wdt_resources[] = {
224 .name =
"ts72xx-wdt",
226 .num_resources =
ARRAY_SIZE(ts72xx_wdt_resources),
227 .resource = ts72xx_wdt_resources,
234 static void __init ts72xx_init_machine(
void)
237 ts72xx_register_flash();
246 .atag_offset = 0x100,
247 .map_io = ts72xx_map_io,
251 .init_machine = ts72xx_init_machine,