Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187380
b: refs/heads/master
c: f126752
h: refs/heads/master
v: v3
  • Loading branch information
Ben Dooks committed Jan 19, 2010
1 parent 656011d commit 2367e8f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0a6361316d6493b9dcbdda9a6a4586c3ccbfd008
refs/heads/master: f126752043c67003de6d34b14160f87ba0323c98
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-s3c2410/usb-simtec.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static void usb_simtec_enableoc(struct s3c2410_hcd_info *info, int on)
}
}

static struct s3c2410_hcd_info usb_simtec_info = {
static struct s3c2410_hcd_info usb_simtec_info __initdata = {
.port[0] = {
.flags = S3C_HCDFLG_USED
},
Expand Down Expand Up @@ -127,6 +127,6 @@ int usb_simtec_init(void)
gpio_direction_output(S3C2410_GPB(4), 1);
gpio_direction_input(S3C2410_GPG(10));

s3c_device_ohci.dev.platform_data = &usb_simtec_info;
s3c_ohci_set_platdata(&usb_simtec_info);
return 0;
}
5 changes: 2 additions & 3 deletions trunk/arch/arm/mach-s3c2442/mach-gta02.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ static struct platform_device gta02_bl_dev = {


/* USB */
static struct s3c2410_hcd_info gta02_usb_info = {
static struct s3c2410_hcd_info gta02_usb_info __initdata = {
.port[0] = {
.flags = S3C_HCDFLG_USED,
},
Expand Down Expand Up @@ -623,9 +623,8 @@ static void __init gta02_machine_init(void)
INIT_DELAYED_WORK(&gta02_charger_work, gta02_charger_worker);
#endif

s3c_device_ohci.dev.platform_data = &gta02_usb_info;

s3c24xx_udc_set_platdata(&gta02_udc_cfg);
s3c_ohci_set_platdata(&gta02_usb_info);
s3c_nand_set_platdata(&gta02_nand_info);
s3c_i2c0_set_platdata(NULL);

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/plat-s3c/include/plat/usb-control.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ static void inline s3c2410_usb_report_oc(struct s3c2410_hcd_info *info, int port
}
}

extern void s3c_ohci_set_platdata(struct s3c2410_hcd_info *info);

#endif /*__ASM_ARCH_USBCONTROL_H */
21 changes: 20 additions & 1 deletion trunk/arch/arm/plat-samsung/dev-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <mach/map.h>

#include <plat/devs.h>

#include <plat/usb-control.h>

static struct resource s3c_usb_resource[] = {
[0] = {
Expand Down Expand Up @@ -48,3 +48,22 @@ struct platform_device s3c_device_ohci = {
};

EXPORT_SYMBOL(s3c_device_ohci);

/**
* s3c_ohci_set_platdata - initialise OHCI device platform data
* @info: The platform data.
*
* This call copies the @info passed in and sets the device .platform_data
* field to that copy. The @info is copied so that the original can be marked
* __initdata.
*/
void __init s3c_ohci_set_platdata(struct s3c2410_hcd_info *info)
{
struct s3c2410_hcd_info *npd;

npd = kmemdup(info, sizeof(struct s3c2410_hcd_info), GFP_KERNEL);
if (!npd)
printk(KERN_ERR "%s: no memory for platform data\n", __func__);

s3c_device_ohci.dev.platform_data = npd;
}

0 comments on commit 2367e8f

Please sign in to comment.