From 7053acbd78336abf5d4bc3d8a875a03624cfb83f Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Thu, 5 Apr 2007 04:07:20 +0100 Subject: [ARM] 4304/1: removes the unnecessary bit number from CKENnn_XXXX This patch removes the unnecessary bit number from CKENnn_XXXX definitions for PXA, so that CKEN0_PWM0 --> CKEN_PWM0 CKEN1_PWM1 --> CKEN_PWM1 ... CKEN24_CAMERA --> CKEN_CAMERA The reasons for the change of these defitions are: 1. they do not scale - they are currently valid for pxa2xx, but definitely not valid for pxa3xx, e.g., pxa3xx has bit 3 for camera instead of bit 24 2. they are unnecessary - the peripheral name within the definition has already announced its usage, we don't need those bit numbers to know which peripheral we are going to enable/disable clock for 3. they are inconvenient - think about this: a driver programmer for pxa has to remember which bit in the CKEN register to turn on/off Another change in the patch is to make the definitions equal to its clock bit index, so that #define CKEN_CAMERA (24) instead of #define CKEN_CAMERA (1 << 24) this change, however, will add a run-time bit shift operation in pxa_set_cken(), but the benefit of this change is that it scales when bit index exceeds 32, e.g., pxa3xx has two registers CKENA and CKENB, totally 64 bit for this, suppose CAMERA clock enabling bit is CKENB:10, one can simply define CKEN_CAMERA to be (32 + 10) and so that pxa_set_cken() need minimum change to adapt to that. Signed-off-by: eric miao Signed-off-by: Russell King --- drivers/usb/host/ohci-pxa27x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/host') diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index f1563dc..23d2fe5 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c @@ -80,7 +80,7 @@ static int pxa27x_start_hc(struct device *dev) inf = dev->platform_data; - pxa_set_cken(CKEN10_USBHOST, 1); + pxa_set_cken(CKEN_USBHOST, 1); UHCHR |= UHCHR_FHR; udelay(11); @@ -123,7 +123,7 @@ static void pxa27x_stop_hc(struct device *dev) UHCCOMS |= 1; udelay(10); - pxa_set_cken(CKEN10_USBHOST, 0); + pxa_set_cken(CKEN_USBHOST, 0); } -- cgit v1.1 From 2fda4c90f65fd96ef910ba285d66984caf600a08 Mon Sep 17 00:00:00 2001 From: Geoff Levand Date: Sun, 6 May 2007 14:51:57 -0700 Subject: ehci-ps3, ohci-ps3: fix compilation As seen on powerpc-cell et al: CC [M] drivers/usb/host/ehci-hcd.o In file included from drivers/usb/host/ehci-hcd.c:941: drivers/usb/host/ehci-ps3.c:79: error: conflicting types for 'dev_dbg' include/linux/device.h:576: error: previous definition of 'dev_dbg' was here make[4]: *** [drivers/usb/host/ehci-hcd.o] Error 1 CC [M] drivers/usb/host/ohci-hcd.o In file included from drivers/usb/host/ohci-hcd.c:921: drivers/usb/host/ohci-ps3.c:83: error: conflicting types for 'dev_dbg' include/linux/device.h:576: error: previous definition of 'dev_dbg' was here dev_dbg() will check format string for you in dummy case also, so remove buggers. Signed-off-by: Alexey Dobriyan Cc: Geert Uytterhoeven Cc: Greg KH Cc: Paul Mackerras Cc: Geoff Levand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/usb/host/ehci-ps3.c | 7 ------- drivers/usb/host/ohci-ps3.c | 8 -------- 2 files changed, 15 deletions(-) (limited to 'drivers/usb/host') diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c index 4d781a2..9310745 100644 --- a/drivers/usb/host/ehci-ps3.c +++ b/drivers/usb/host/ehci-ps3.c @@ -73,13 +73,6 @@ static const struct hc_driver ps3_ehci_hc_driver = { #endif }; -#if !defined(DEBUG) -#undef dev_dbg -static inline int __attribute__ ((format (printf, 2, 3))) dev_dbg( - const struct device *_dev, const char *fmt, ...) {return 0;} -#endif - - static int ps3_ehci_sb_probe(struct ps3_system_bus_device *dev) { int result; diff --git a/drivers/usb/host/ohci-ps3.c b/drivers/usb/host/ohci-ps3.c index 62283a3..c849f72 100644 --- a/drivers/usb/host/ohci-ps3.c +++ b/drivers/usb/host/ohci-ps3.c @@ -75,14 +75,6 @@ static const struct hc_driver ps3_ohci_hc_driver = { #endif }; -/* redefine dev_dbg to do a syntax check */ - -#if !defined(DEBUG) -#undef dev_dbg -static inline int __attribute__ ((format (printf, 2, 3))) dev_dbg( - const struct device *_dev, const char *fmt, ...) {return 0;} -#endif - static int ps3_ohci_sb_probe(struct ps3_system_bus_device *dev) { int result; -- cgit v1.1