20 #include <mach/portmux.h>
24 #include "../../mach-at32ap/clock.h"
28 #define HAMMERHEAD_USB_PERIPH_GCLK0 0x40000000
29 #define HAMMERHEAD_USB_PERIPH_CS2 0x02000000
30 #define HAMMERHEAD_USB_PERIPH_EXTINT0 0x02000000
32 #define HAMMERHEAD_FPGA_PERIPH_MOSI 0x00000002
33 #define HAMMERHEAD_FPGA_PERIPH_SCK 0x00000020
34 #define HAMMERHEAD_FPGA_PERIPH_EXTINT3 0x10000000
44 .ncs_write_pulse = 65,
51 static struct smc_config flash_config __initdata = {
84 static struct resource flash_resource = {
91 .
name =
"physmap-flash",
93 .resource = &flash_resource,
95 .dev = { .platform_data = &flash_data, },
98 #ifdef CONFIG_BOARD_HAMMERHEAD_USB
100 static struct smc_timing isp1160_timing __initdata = {
103 .ncs_write_setup = 75,
109 .ncs_read_pulse = 75,
111 .ncs_write_pulse = 75,
118 static struct smc_config isp1160_config __initdata = {
140 .int_edge_triggered = 0,
145 static struct resource isp1160_resource[] = {
163 .
name =
"isp116x-hcd",
165 .resource = isp1160_resource,
168 .platform_data = &isp1160_data,
173 #ifdef CONFIG_BOARD_HAMMERHEAD_USB
174 static int __init hammerhead_usbh_init(
void)
187 "hammerhead: failed to set ISP1160 USBH timing\n");
201 pr_debug(
"hammerhead: failed to set osc1 for USBH clock\n");
238 #ifdef CONFIG_BOARD_HAMMERHEAD_FPGA
239 static struct smc_timing fpga_timing __initdata = {
242 .ncs_read_pulse = 48,
246 .ncs_write_setup = 16,
248 .ncs_write_pulse = 32,
253 static struct smc_config fpga_config __initdata = {
260 static struct resource hh_fpga0_resource[] = {
263 .end = 0xffe00400 + 0x3ff,
288 .dma_mask = &hh_fpga0_dma_mask,
291 .resource = hh_fpga0_resource,
292 .num_resources =
ARRAY_SIZE(hh_fpga0_resource),
295 static struct clk hh_fpga0_spi_clk = {
297 .dev = &hh_fpga0_device.
dev,
338 return &hh_fpga0_device;
343 static int __init hammerhead_flash_init(
void)
357 #ifdef CONFIG_BOARD_HAMMERHEAD_USB
358 hammerhead_usbh_init();
361 #ifdef CONFIG_BOARD_HAMMERHEAD_FPGA