mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-01 19:41:19 +00:00
ARM: sa11x0: badge4: move board specific ohci initialization to badge4.c
Move the handling of the 5v supply into badge4.c, removing this board specific detail from the sa1111 ohci driver. Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
ae99ddbc97
commit
3259701cc2
2 changed files with 15 additions and 14 deletions
|
@ -51,8 +51,23 @@ static struct resource sa1111_resources[] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int badge4_sa1111_enable(void *data, unsigned devid)
|
||||||
|
{
|
||||||
|
if (devid == SA1111_DEVID_USB)
|
||||||
|
badge4_set_5V(BADGE4_5V_USB, 1);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void badge4_sa1111_disable(void *data, unsigned devid)
|
||||||
|
{
|
||||||
|
if (devid == SA1111_DEVID_USB)
|
||||||
|
badge4_set_5V(BADGE4_5V_USB, 0);
|
||||||
|
}
|
||||||
|
|
||||||
static struct sa1111_platform_data sa1111_info = {
|
static struct sa1111_platform_data sa1111_info = {
|
||||||
.irq_base = IRQ_BOARD_END,
|
.irq_base = IRQ_BOARD_END,
|
||||||
|
.enable = badge4_sa1111_enable,
|
||||||
|
.disable = badge4_sa1111_disable,
|
||||||
};
|
};
|
||||||
|
|
||||||
static u64 sa1111_dmamask = 0xffffffffUL;
|
static u64 sa1111_dmamask = 0xffffffffUL;
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <mach/assabet.h>
|
#include <mach/assabet.h>
|
||||||
#include <mach/badge4.h>
|
|
||||||
#include <asm/hardware/sa1111.h>
|
#include <asm/hardware/sa1111.h>
|
||||||
|
|
||||||
#ifndef CONFIG_SA1111
|
#ifndef CONFIG_SA1111
|
||||||
|
@ -35,12 +34,6 @@ static int sa1111_start_hc(struct sa1111_dev *dev)
|
||||||
printk(KERN_DEBUG "%s: starting SA-1111 OHCI USB Controller\n",
|
printk(KERN_DEBUG "%s: starting SA-1111 OHCI USB Controller\n",
|
||||||
__FILE__);
|
__FILE__);
|
||||||
|
|
||||||
#ifdef CONFIG_SA1100_BADGE4
|
|
||||||
if (machine_is_badge4()) {
|
|
||||||
badge4_set_5V(BADGE4_5V_USB, 1);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (machine_is_xp860() ||
|
if (machine_is_xp860() ||
|
||||||
machine_has_neponset() ||
|
machine_has_neponset() ||
|
||||||
machine_is_pfs168() ||
|
machine_is_pfs168() ||
|
||||||
|
@ -84,13 +77,6 @@ static void sa1111_stop_hc(struct sa1111_dev *dev)
|
||||||
* Stop the USB clock.
|
* Stop the USB clock.
|
||||||
*/
|
*/
|
||||||
sa1111_disable_device(dev);
|
sa1111_disable_device(dev);
|
||||||
|
|
||||||
#ifdef CONFIG_SA1100_BADGE4
|
|
||||||
if (machine_is_badge4()) {
|
|
||||||
/* Disable power to the USB bus */
|
|
||||||
badge4_set_5V(BADGE4_5V_USB, 0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue