12 #include <linux/kernel.h>
24 #define HAWKBOARD_PHY_ID "davinci_mdio-0:07"
25 #define DA850_HAWK_MMCSD_CD_PIN GPIO_TO_PIN(3, 12)
26 #define DA850_HAWK_MMCSD_WP_PIN GPIO_TO_PIN(3, 13)
28 #define DA850_USB1_VBUS_PIN GPIO_TO_PIN(2, 4)
29 #define DA850_USB1_OC_PIN GPIO_TO_PIN(6, 13)
31 static short omapl138_hawk_mii_pins[]
__initdata = {
40 static __init void omapl138_hawk_config_emac(
void)
51 pr_warning(
"%s: cpgmac/mii mux setup failed: %d\n",
58 pr_info(
"EMAC: MII PHY configured\n");
64 pr_warning(
"%s: emac registration failed: %d\n",
73 static const s16 da850_dma0_rsv_chans[][2] = {
81 static const s16 da850_dma0_rsv_slots[][2] = {
89 static const s16 da850_dma1_rsv_chans[][2] = {
96 static const s16 da850_dma1_rsv_slots[][2] = {
104 .rsv_chans = da850_dma0_rsv_chans,
105 .rsv_slots = da850_dma0_rsv_slots,
109 .rsv_chans = da850_dma1_rsv_chans,
110 .rsv_slots = da850_dma1_rsv_slots,
118 static const short hawk_mmcsd0_pins[] = {
125 static int da850_hawk_mmc_get_ro(
int index)
130 static int da850_hawk_mmc_get_cd(
int index)
136 .get_ro = da850_hawk_mmc_get_ro,
137 .get_cd = da850_hawk_mmc_get_cd,
139 .max_freq = 50000000,
144 static __init void omapl138_hawk_mmc_init(
void)
150 pr_warning(
"%s: MMC/SD0 mux setup failed: %d\n",
168 goto mmc_setup_wp_fail;
173 pr_warning(
"%s: MMC/SD0 registration failed: %d\n",
175 goto mmc_setup_mmcsd_fail;
180 mmc_setup_mmcsd_fail:
189 static const short da850_hawk_usb11_pins[] = {
194 static int hawk_usb_set_power(
unsigned port,
int on)
200 static int hawk_usb_get_power(
unsigned port)
205 static int hawk_usb_get_oci(
unsigned port)
215 if (handler !=
NULL) {
216 hawk_usb_ocic_handler = handler;
218 error =
request_irq(irq, omapl138_hawk_usb_ocic_irq,
221 "OHCI over-current indicator",
NULL);
223 pr_err(
"%s: could not request IRQ to watch "
224 "over-current indicator changes\n", __func__);
232 .set_power = hawk_usb_set_power,
233 .get_power = hawk_usb_get_power,
234 .get_oci = hawk_usb_get_oci,
235 .ocic_notify = hawk_usb_ocic_notify,
237 .potpgt = (3 + 1) / 2,
242 hawk_usb_ocic_handler(&omapl138_hawk_usb11_pdata, 1);
246 static __init void omapl138_hawk_usb_init(
void)
253 pr_warning(
"%s: USB 1.1 PinMux setup failed: %d\n",
268 pr_err(
"%s: failed to request GPIO for USB 1.1 port "
269 "power control: %d\n", __func__, ret);
276 pr_err(
"%s: failed to request GPIO for USB 1.1 port "
277 "over-current indicator: %d\n", __func__, ret);
278 goto usb11_setup_oc_fail;
283 pr_warning(
"%s: USB 1.1 registration failed: %d\n",
285 goto usb11_setup_fail;
297 .enabled_uarts = 0x7,
300 static __init void omapl138_hawk_init(
void)
306 omapl138_hawk_config_emac();
310 pr_warning(
"%s: EDMA registration failed: %d\n",
313 omapl138_hawk_mmc_init();
315 omapl138_hawk_usb_init();
320 "watchdog registration failed: %d\n",
324 #ifdef CONFIG_SERIAL_8250_CONSOLE
325 static int __init omapl138_hawk_console_init(
void)
327 if (!machine_is_omapl138_hawkboard())
335 static void __init omapl138_hawk_map_io(
void)
340 MACHINE_START(OMAPL138_HAWKBOARD,
"AM18x/OMAP-L138 Hawkboard")
341 .atag_offset = 0x100,
342 .map_io = omapl138_hawk_map_io,
345 .init_machine = omapl138_hawk_init,