diff options
| -rw-r--r-- | Documentation/i2c/instantiating-devices | 6 | ||||
| -rw-r--r-- | drivers/usb/host/ohci-hcd.c | 2 | ||||
| -rw-r--r-- | drivers/usb/host/ohci-nxp.c | 53 |
3 files changed, 31 insertions, 30 deletions
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices index 9edb75d8c9b9..abf63615ee05 100644 --- a/Documentation/i2c/instantiating-devices +++ b/Documentation/i2c/instantiating-devices | |||
| @@ -87,11 +87,11 @@ it may have different addresses from one board to the next (manufacturer | |||
| 87 | changing its design without notice). In this case, you can call | 87 | changing its design without notice). In this case, you can call |
| 88 | i2c_new_probed_device() instead of i2c_new_device(). | 88 | i2c_new_probed_device() instead of i2c_new_device(). |
| 89 | 89 | ||
| 90 | Example (from the pnx4008 OHCI driver): | 90 | Example (from the nxp OHCI driver): |
| 91 | 91 | ||
| 92 | static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; | 92 | static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; |
| 93 | 93 | ||
| 94 | static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) | 94 | static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev) |
| 95 | { | 95 | { |
| 96 | (...) | 96 | (...) |
| 97 | struct i2c_adapter *i2c_adap; | 97 | struct i2c_adapter *i2c_adap; |
| @@ -100,7 +100,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) | |||
| 100 | (...) | 100 | (...) |
| 101 | i2c_adap = i2c_get_adapter(2); | 101 | i2c_adap = i2c_get_adapter(2); |
| 102 | memset(&i2c_info, 0, sizeof(struct i2c_board_info)); | 102 | memset(&i2c_info, 0, sizeof(struct i2c_board_info)); |
| 103 | strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE); | 103 | strlcpy(i2c_info.type, "isp1301_nxp", I2C_NAME_SIZE); |
| 104 | isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info, | 104 | isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info, |
| 105 | normal_i2c, NULL); | 105 | normal_i2c, NULL); |
| 106 | i2c_put_adapter(i2c_adap); | 106 | i2c_put_adapter(i2c_adap); |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 4b011b7c1ce4..dba50deb7e9a 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
| @@ -1052,7 +1052,7 @@ MODULE_LICENSE ("GPL"); | |||
| 1052 | 1052 | ||
| 1053 | #ifdef CONFIG_ARCH_PNX4008 | 1053 | #ifdef CONFIG_ARCH_PNX4008 |
| 1054 | #include "ohci-nxp.c" | 1054 | #include "ohci-nxp.c" |
| 1055 | #define PLATFORM_DRIVER usb_hcd_pnx4008_driver | 1055 | #define PLATFORM_DRIVER usb_hcd_nxp_driver |
| 1056 | #endif | 1056 | #endif |
| 1057 | 1057 | ||
| 1058 | #ifdef CONFIG_ARCH_DAVINCI_DA8XX | 1058 | #ifdef CONFIG_ARCH_DAVINCI_DA8XX |
diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c index 0013db7bdf92..a12c6b40472e 100644 --- a/drivers/usb/host/ohci-nxp.c +++ b/drivers/usb/host/ohci-nxp.c | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * drivers/usb/host/ohci-pnx4008.c | 2 | * driver for NXP USB Host devices |
| 3 | * | 3 | * |
| 4 | * driver for Philips PNX4008 USB Host | 4 | * Currently supported OHCI host devices: |
| 5 | * - Philips PNX4008 | ||
| 5 | * | 6 | * |
| 6 | * Authors: Dmitry Chigirev <source@mvista.com> | 7 | * Authors: Dmitry Chigirev <source@mvista.com> |
| 7 | * Vitaly Wool <vitalywool@gmail.com> | 8 | * Vitaly Wool <vitalywool@gmail.com> |
| @@ -121,13 +122,13 @@ static int isp1301_remove(struct i2c_client *client) | |||
| 121 | } | 122 | } |
| 122 | 123 | ||
| 123 | static const struct i2c_device_id isp1301_id[] = { | 124 | static const struct i2c_device_id isp1301_id[] = { |
| 124 | { "isp1301_pnx", 0 }, | 125 | { "isp1301_nxp", 0 }, |
| 125 | { } | 126 | { } |
| 126 | }; | 127 | }; |
| 127 | 128 | ||
| 128 | static struct i2c_driver isp1301_driver = { | 129 | static struct i2c_driver isp1301_driver = { |
| 129 | .driver = { | 130 | .driver = { |
| 130 | .name = "isp1301_pnx", | 131 | .name = "isp1301_nxp", |
| 131 | }, | 132 | }, |
| 132 | .probe = isp1301_probe, | 133 | .probe = isp1301_probe, |
| 133 | .remove = isp1301_remove, | 134 | .remove = isp1301_remove, |
| @@ -180,14 +181,14 @@ static inline void isp1301_vbus_off(void) | |||
| 180 | ISP1301_I2C_OTG_CONTROL_1 | ISP1301_I2C_REG_CLEAR_ADDR); | 181 | ISP1301_I2C_OTG_CONTROL_1 | ISP1301_I2C_REG_CLEAR_ADDR); |
| 181 | } | 182 | } |
| 182 | 183 | ||
| 183 | static void pnx4008_start_hc(void) | 184 | static void nxp_start_hc(void) |
| 184 | { | 185 | { |
| 185 | unsigned long tmp = __raw_readl(USB_OTG_STAT_CONTROL) | HOST_EN; | 186 | unsigned long tmp = __raw_readl(USB_OTG_STAT_CONTROL) | HOST_EN; |
| 186 | __raw_writel(tmp, USB_OTG_STAT_CONTROL); | 187 | __raw_writel(tmp, USB_OTG_STAT_CONTROL); |
| 187 | isp1301_vbus_on(); | 188 | isp1301_vbus_on(); |
| 188 | } | 189 | } |
| 189 | 190 | ||
| 190 | static void pnx4008_stop_hc(void) | 191 | static void nxp_stop_hc(void) |
| 191 | { | 192 | { |
| 192 | unsigned long tmp; | 193 | unsigned long tmp; |
| 193 | isp1301_vbus_off(); | 194 | isp1301_vbus_off(); |
| @@ -195,7 +196,7 @@ static void pnx4008_stop_hc(void) | |||
| 195 | __raw_writel(tmp, USB_OTG_STAT_CONTROL); | 196 | __raw_writel(tmp, USB_OTG_STAT_CONTROL); |
| 196 | } | 197 | } |
| 197 | 198 | ||
| 198 | static int __devinit ohci_pnx4008_start(struct usb_hcd *hcd) | 199 | static int __devinit ohci_nxp_start(struct usb_hcd *hcd) |
| 199 | { | 200 | { |
| 200 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); | 201 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); |
| 201 | int ret; | 202 | int ret; |
| @@ -211,9 +212,9 @@ static int __devinit ohci_pnx4008_start(struct usb_hcd *hcd) | |||
| 211 | return 0; | 212 | return 0; |
| 212 | } | 213 | } |
| 213 | 214 | ||
| 214 | static const struct hc_driver ohci_pnx4008_hc_driver = { | 215 | static const struct hc_driver ohci_nxp_hc_driver = { |
| 215 | .description = hcd_name, | 216 | .description = hcd_name, |
| 216 | .product_desc = "pnx4008 OHCI", | 217 | .product_desc = "nxp OHCI", |
| 217 | 218 | ||
| 218 | /* | 219 | /* |
| 219 | * generic hardware linkage | 220 | * generic hardware linkage |
| @@ -225,7 +226,7 @@ static const struct hc_driver ohci_pnx4008_hc_driver = { | |||
| 225 | /* | 226 | /* |
| 226 | * basic lifecycle operations | 227 | * basic lifecycle operations |
| 227 | */ | 228 | */ |
| 228 | .start = ohci_pnx4008_start, | 229 | .start = ohci_nxp_start, |
| 229 | .stop = ohci_stop, | 230 | .stop = ohci_stop, |
| 230 | .shutdown = ohci_shutdown, | 231 | .shutdown = ohci_shutdown, |
| 231 | 232 | ||
| @@ -255,7 +256,7 @@ static const struct hc_driver ohci_pnx4008_hc_driver = { | |||
| 255 | 256 | ||
| 256 | #define USB_CLOCK_MASK (AHB_M_CLOCK_ON| OTG_CLOCK_ON | HOST_CLOCK_ON | I2C_CLOCK_ON) | 257 | #define USB_CLOCK_MASK (AHB_M_CLOCK_ON| OTG_CLOCK_ON | HOST_CLOCK_ON | I2C_CLOCK_ON) |
| 257 | 258 | ||
| 258 | static void pnx4008_set_usb_bits(void) | 259 | static void nxp_set_usb_bits(void) |
| 259 | { | 260 | { |
| 260 | start_int_set_falling_edge(SE_USB_OTG_ATX_INT_N); | 261 | start_int_set_falling_edge(SE_USB_OTG_ATX_INT_N); |
| 261 | start_int_ack(SE_USB_OTG_ATX_INT_N); | 262 | start_int_ack(SE_USB_OTG_ATX_INT_N); |
| @@ -282,7 +283,7 @@ static void pnx4008_set_usb_bits(void) | |||
| 282 | start_int_umask(SE_USB_AHB_NEED_CLK_INT); | 283 | start_int_umask(SE_USB_AHB_NEED_CLK_INT); |
| 283 | } | 284 | } |
| 284 | 285 | ||
| 285 | static void pnx4008_unset_usb_bits(void) | 286 | static void nxp_unset_usb_bits(void) |
| 286 | { | 287 | { |
| 287 | start_int_mask(SE_USB_OTG_ATX_INT_N); | 288 | start_int_mask(SE_USB_OTG_ATX_INT_N); |
| 288 | start_int_mask(SE_USB_OTG_TIMER_INT); | 289 | start_int_mask(SE_USB_OTG_TIMER_INT); |
| @@ -292,17 +293,17 @@ static void pnx4008_unset_usb_bits(void) | |||
| 292 | start_int_mask(SE_USB_AHB_NEED_CLK_INT); | 293 | start_int_mask(SE_USB_AHB_NEED_CLK_INT); |
| 293 | } | 294 | } |
| 294 | 295 | ||
| 295 | static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) | 296 | static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev) |
| 296 | { | 297 | { |
| 297 | struct usb_hcd *hcd = 0; | 298 | struct usb_hcd *hcd = 0; |
| 298 | struct ohci_hcd *ohci; | 299 | struct ohci_hcd *ohci; |
| 299 | const struct hc_driver *driver = &ohci_pnx4008_hc_driver; | 300 | const struct hc_driver *driver = &ohci_nxp_hc_driver; |
| 300 | struct i2c_adapter *i2c_adap; | 301 | struct i2c_adapter *i2c_adap; |
| 301 | struct i2c_board_info i2c_info; | 302 | struct i2c_board_info i2c_info; |
| 302 | 303 | ||
| 303 | int ret = 0, irq; | 304 | int ret = 0, irq; |
| 304 | 305 | ||
| 305 | dev_dbg(&pdev->dev, "%s: " DRIVER_DESC " (pnx4008)\n", hcd_name); | 306 | dev_dbg(&pdev->dev, "%s: " DRIVER_DESC " (nxp)\n", hcd_name); |
| 306 | if (usb_disabled()) { | 307 | if (usb_disabled()) { |
| 307 | err("USB is disabled"); | 308 | err("USB is disabled"); |
| 308 | ret = -ENODEV; | 309 | ret = -ENODEV; |
| @@ -327,7 +328,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) | |||
| 327 | } | 328 | } |
| 328 | i2c_adap = i2c_get_adapter(2); | 329 | i2c_adap = i2c_get_adapter(2); |
| 329 | memset(&i2c_info, 0, sizeof(struct i2c_board_info)); | 330 | memset(&i2c_info, 0, sizeof(struct i2c_board_info)); |
| 330 | strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE); | 331 | strlcpy(i2c_info.type, "isp1301_nxp", I2C_NAME_SIZE); | <
