arm omap patches for -next merge window
Subsystems (7)
cover arm omap patches for -next merge window
Hi Tony,
here are the patches I have prepared for you for the next merge window.
There's one patch on musb which is a dependency for for not passing the clk name down to the driver.
The same patch will be going through Greg so you don't need to queue that patch on your tree.
Felipe Balbi (9):
arm: omap: musb: remove unused data
arm: omap: musb: we can use clk framework
arm: omap: musb: remove unused soft_con field
arm: omap: musb: remove unused dma data
arm: omap: musb: remove unnecessary return
arm: omap: gpmc: avoid section definitions on headers
usb: musb: use only clk framework for clk handling
arm: omap: musb: do not pass clock name to driver
arm: omap: musb: get rid of dyn_fifo
arch/arm/mach-omap2/usb-musb.c | 71 +------------------------------- arch/arm/plat-omap/include/plat/gpmc.h | 2 +- drivers/usb/musb/musb_core.c | 48 +++++++-------------- drivers/usb/musb/musb_core.h | 2 - drivers/usb/musb/omap2430.c | 10 +---- drivers/usb/musb/tusb6010.c | 16 +++---- include/linux/usb/musb.h | 4 +- 7 files changed, 28 insertions(+), 125 deletions(-)
PATCH 1/9 arm: omap: musb: remove unused data
eps_bits wasn't being used anywhere, let's
remove it.
--- arch/arm/mach-omap2/usb-musb.c | 34 ---------------------------------- 1 files changed, 0 insertions(+), 34 deletions(-)
arch/arm/mach-omap2/usb-musb.c +0 -34
@@ -68,39 +68,6 @@ static int musb_set_clock(struct clk *clk, int state)return 0 ; } -static struct musb_hdrc_eps_bits musb_eps[] = { - {"ep1_tx" ,10 , }, - {"ep1_rx" ,10 , }, - {"ep2_tx" ,9 , }, - {"ep2_rx" ,9 , }, - {"ep3_tx" ,3 , }, - {"ep3_rx" ,3 , }, - {"ep4_tx" ,3 , }, - {"ep4_rx" ,3 , }, - {"ep5_tx" ,3 , }, - {"ep5_rx" ,3 , }, - {"ep6_tx" ,3 , }, - {"ep6_rx" ,3 , }, - {"ep7_tx" ,3 , }, - {"ep7_rx" ,3 , }, - {"ep8_tx" ,2 , }, - {"ep8_rx" ,2 , }, - {"ep9_tx" ,2 , }, - {"ep9_rx" ,2 , }, - {"ep10_tx" ,2 , }, - {"ep10_rx" ,2 , }, - {"ep11_tx" ,2 , }, - {"ep11_rx" ,2 , }, - {"ep12_tx" ,2 , }, - {"ep12_rx" ,2 , }, - {"ep13_tx" ,2 , }, - {"ep13_rx" ,2 , }, - {"ep14_tx" ,2 , }, - {"ep14_rx" ,2 , }, - {"ep15_tx" ,2 , }, - {"ep15_rx" ,2 , }, -}; -static struct musb_hdrc_config musb_config = { .multipoint =1 , .dyn_fifo =1 ,
@@ -110,7 +77,6 @@ static struct musb_hdrc_config musb_config = { .dma_channels = 7, .dma_req_chan = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3), .ram_bits = 12, - .eps_bits = musb_eps, };static struct musb_hdrc_platform_data musb_plat = {
Signature · 1 line
1.6.6.35.g1d85d
PATCH 2/9 arm: omap: musb: we can use clk framework
In reply to Felipe Balbi... in order to handle musb's clock. Let's start
removing the old musb-only set_clock function.
--- arch/arm/mach-omap2/usb-musb.c | 22 ---------------------- 1 files changed, 0 insertions(+), 22 deletions(-)
arch/arm/mach-omap2/usb-musb.c +0 -22
@@ -47,27 +47,6 @@ static struct resource musb_resources[] = { }, }; -static int clk_on; - -static int musb_set_clock (struct clk *clk,int state) -{ -if (state) { -if (clk_on >0 ) -return -ENODEV ; - -clk_enable (clk); - clk_on =1 ; - }else { -if (clk_on ==0 ) -return -ENODEV ; - -clk_disable (clk); - clk_on =0 ; - } - -return 0 ; -} -static struct musb_hdrc_config musb_config = { .multipoint =1 , .dyn_fifo =1 ,
@@ -81,7 +60,6 @@ static struct musb_hdrc_config musb_config = {static struct musb_hdrc_platform_data musb_plat = {/* .clock is set dynamically */ - .set_clock = musb_set_clock, .config = &musb_config,/* .power = DYNAMIC, */ /* .mode = DYNAMIC, */
Signature · 1 line
1.6.6.35.g1d85d
PATCH 3/9 arm: omap: musb: remove unused soft_con field
In reply to Felipe Balbiremove unused data.
--- arch/arm/mach-omap2/usb-musb.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/usb-musb.c +0 -1
@@ -50,7 +50,6 @@ static struct resource musb_resources[] = {static struct musb_hdrc_config musb_config = { .multipoint =1 , .dyn_fifo =1 , - .soft_con =1 , .dma =1 , .num_eps =16 , .dma_channels =7 ,
Signature · 1 line
1.6.6.35.g1d85d
PATCH 4/9 arm: omap: musb: remove unused dma data
In reply to Felipe Balbiwe don't use those anywhere on musb driver, so
let's remove those old stuff.
--- arch/arm/mach-omap2/usb-musb.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/usb-musb.c +0 -3
@@ -50,10 +50,7 @@ static struct resource musb_resources[] = {static struct musb_hdrc_config musb_config = { .multipoint =1 , .dyn_fifo =1 , - .dma =1 , .num_eps =16 , - .dma_channels =7 , - .dma_req_chan = (1 <<0 ) | (1 <<1 ) | (1 <<2 ) | (1 <<3 ), .ram_bits =12 , };
Signature · 1 line
1.6.6.35.g1d85d
PATCH 5/9 arm: omap: musb: remove unnecessary return
In reply to Felipe Balbitrivial patch, no functional changes.
--- arch/arm/mach-omap2/usb-musb.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/usb-musb.c +1 -3
@@ -91,10 +91,8 @@ void __init usb_musb_init(enum musb_mode mode, unsigned power) musb_plat.power = power >>1 ; musb_plat.mode = mode; -if (platform_device_register (&musb_device) <0 ) { +if (platform_device_register (&musb_device) <0 ) printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); -return ; - } }#else
Signature · 1 line
1.6.6.35.g1d85d
PATCH 6/9 arm: omap: gpmc: avoid section definitions on headers
In reply to Felipe Balbitrivial patch, no functional changes.
--- arch/arm/plat-omap/include/plat/gpmc.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/include/plat/gpmc.h +1 -1
@@ -110,6 +110,6 @@ extern void gpmc_prefetch_reset(void);extern int gpmc_prefetch_status (void );extern void omap3_gpmc_save_context (void );extern void omap3_gpmc_restore_context (void ); -extern void __init gpmc_init (void ); +extern void gpmc_init (void );#endif
Signature · 1 line
1.6.6.35.g1d85d
PATCH 7/9 usb: musb: use only clk framework for clk handling
In reply to Felipe Balbiget rid of the set_clock hackery.
---
Greg, I'll send this patch to you shortly, it's only here so that Tony can have it in linux-omap-2.6 to avoid breaking any of his boards.
drivers/usb/musb/musb_core.c | 48 ++++++++++++++---------------------------- drivers/usb/musb/musb_core.h | 2 - drivers/usb/musb/omap2430.c | 10 +------- drivers/usb/musb/tusb6010.c | 16 +++++-------- include/linux/usb/musb.h | 4 +- 5 files changed, 26 insertions(+), 54 deletions(-)
drivers/usb/musb/musb_core.c +16 -32
@@ -977,10 +977,8 @@ static void musb_shutdown(struct platform_device *pdev)spin_lock_irqsave (&musb->lock, flags);musb_platform_disable (musb);musb_generic_disable (musb); -if (musb->clock) { -clk_put (musb->clock); - musb->clock =NULL ; - } +clk_put (musb->clock); + musb->clock =NULL ;spin_unlock_irqrestore (&musb->lock, flags);/* FIXME power down */
@@ -1864,10 +1862,8 @@ static void musb_free(struct musb *musb)musb_platform_exit (musb);musb_writeb (musb->mregs,MUSB_DEVCTL ,0 ); -if (musb->clock) { -clk_disable (musb->clock); -clk_put (musb->clock); - } +clk_disable (musb->clock); +clk_put (musb->clock);#ifdef CONFIG_USB_MUSB_HDRC_HCD usb_put_hcd (musb_to_hcd (musb));
@@ -1930,7 +1926,6 @@ bad_config:spin_lock_init (&musb->lock); musb->board_mode = plat->mode; musb->board_set_power = plat->set_power; - musb->set_clock = plat->set_clock; musb->min_power = plat->min_power;/* Clock usage is chip-specific ... functional clock (DaVinci,
@@ -1938,15 +1933,17 @@ bad_config:* code does is make sure a clock handle is available; platform * code manages it during start/stop and suspend/resume. */ -if (plat->clock) { - musb->clock =clk_get (dev, plat->clock); -if (IS_ERR (musb->clock)) { - status =PTR_ERR (musb->clock); - musb->clock =NULL ; - goto fail; - } + musb->clock =clk_get (dev,"ick" ); +if (IS_ERR (musb->clock)) { + status =PTR_ERR (musb->clock); + musb->clock =NULL ; + goto fail; } + status =clk_enable (musb->clock); +if (status <0 ) + goto fail; +/* The musb_platform_init() call: * - adjusts musb->mregs and musb->isr if needed, * - may initialize an integrated tranceiver
@@ -2104,8 +2101,7 @@ fail:dev_err (musb->controller,"musb_init_controller failed with status %d\n" , status); -if (musb->clock) -clk_put (musb->clock); +clk_put (musb->clock);device_init_wakeup (dev,0 );musb_free (musb);
@@ -2179,9 +2175,6 @@ static int musb_suspend(struct device *dev)unsigned long flags;struct musb *musb =dev_to_musb (&pdev->dev); -if (!musb->clock) -return 0 ; -spin_lock_irqsave (&musb->lock, flags);if (is_peripheral_active (musb)) {
@@ -2194,10 +2187,7 @@ static int musb_suspend(struct device *dev)*/ } -if (musb->set_clock) - musb->set_clock (musb->clock,0 ); -else -clk_disable (musb->clock); +clk_disable (musb->clock);spin_unlock_irqrestore (&musb->lock, flags);return 0 ; }
@@ -2207,13 +2197,7 @@ static int musb_resume_noirq(struct device *dev)struct platform_device *pdev =to_platform_device (dev);struct musb *musb =dev_to_musb (&pdev->dev); -if (!musb->clock) -return 0 ; - -if (musb->set_clock) - musb->set_clock (musb->clock,1 ); -else -clk_enable (musb->clock); +clk_enable (musb->clock);/* for static cmos like DaVinci, register values were preserved * unless for some reason the whole soc powered down or the USB
drivers/usb/musb/musb_core.h +0 -2
@@ -394,8 +394,6 @@ struct musb {u8 board_mode;/* enum musb_mode */ int (*board_set_power)(int state); -int (*set_clock)(struct clk *clk,int is_active); -u8 min_power;/* vbus for periph, in mA/2 */ bool is_host;
drivers/usb/musb/omap2430.c +2 -8
@@ -273,10 +273,7 @@ int musb_platform_suspend(struct musb *musb)otg_set_suspend (musb->xceiv,1 ); -if (musb->set_clock) - musb->set_clock (musb->clock,0 ); -else -clk_disable (musb->clock); +clk_disable (musb->clock);return 0 ; }
@@ -290,10 +287,7 @@ static int musb_platform_resume(struct musb *musb)otg_set_suspend (musb->xceiv,0 ); -if (musb->set_clock) - musb->set_clock (musb->clock,1 ); -else -clk_enable (musb->clock); +clk_enable (musb->clock); l =omap_readl (OTG_SYSCONFIG ); l &= ~ENABLEWAKEUP ;/* disable wakeup */
drivers/usb/musb/tusb6010.c +6 -10
@@ -279,12 +279,10 @@ static int tusb_draw_power(struct otg_transceiver *x, unsigned mA)* Keep clock active when enabled. Note that this is not tied to * drawing VBUS, as with OTG mA can be less than musb->min_power. */ -if (musb->set_clock) { -if (mA) - musb->set_clock (musb->clock,1 ); -else - musb->set_clock (musb->clock,0 ); - } +if (mA) +clk_enable (musb->clock); +else +clk_disable (musb->clock);/* tps65030 seems to consume max 100mA, with maybe 60mA available * (measured on one board) for things other than tps and tusb.
@@ -531,8 +529,7 @@ static void tusb_source_power(struct musb *musb, int is_on) devctl =musb_readb (musb->mregs,MUSB_DEVCTL );if (is_on) { -if (musb->set_clock) - musb->set_clock (musb->clock,1 ); +clk_enable (musb->clock); timer =OTG_TIMER_MS (OTG_TIME_A_WAIT_VRISE ); musb->xceiv->default_a =1 ; musb->xceiv->state =OTG_STATE_A_WAIT_VRISE ;
@@ -571,8 +568,7 @@ static void tusb_source_power(struct musb *musb, int is_on) devctl &= ~MUSB_DEVCTL_SESSION ; conf &= ~TUSB_DEV_CONF_USB_HOST_MODE ; -if (musb->set_clock) - musb->set_clock (musb->clock,0 ); +clk_disable (musb->clock); } prcm &= ~(TUSB_PRCM_MNGMT_15_SW_EN |TUSB_PRCM_MNGMT_33_SW_EN );
include/linux/usb/musb.h +2 -2
@@ -62,7 +62,7 @@ struct musb_hdrc_platform_data {u8 mode;/* for clk_get() */ -const char *clock; +const char *clock__deprecated ;/* (HOST or OTG) switch VBUS on/off */ int (*set_vbus)(struct device *dev,int is_on);
@@ -80,7 +80,7 @@ struct musb_hdrc_platform_data {int (*set_power)(int state);/* Turn device clock on or off */ -int (*set_clock)(struct clk *clock,int is_on); +int (*set_clock)(struct clk *clock,int is_on)__deprecated ;/* MUSB configuration-specific details */ struct musb_hdrc_config *config;
Signature · 1 line
1.6.6.35.g1d85d
A message that is not in the archive (sent off-list or not yet received): 1262127567-15202-8-git-send-email-felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org
Re: [patch-v2.6.34 7/9] usb: musb: use only clk framework for clk handling
Hello.
Quoted 10 lines · Felipe Balbi
get rid of the
set_clockhackery.Signed-off-by Felipe Balbi <[email protected]>---
Greg, I'll send this patch to you shortly, it's only here so that Tony can have it in linux-omap-2.6 to avoid breaking any of his boards.
Er, I'm afraid I have to NAK this patch...
Quoted 41 lines
drivers/usb/musb/musb_core.c +4
-9@@ -977,10 +977,8 @@ static void musb_shutdown(struct platform_device *pdev)spin_lock_irqsave (&musb->lock, flags);musb_platform_disable (musb);musb_generic_disable (musb); -if (musb->clock) { -clk_put (musb->clock); - musb->clock =NULL ; - } +clk_put (musb->clock); + musb->clock =NULL ;spin_unlock_irqrestore (&musb->lock, flags);/* FIXME power down */ @@ -1864,10 +1862,8 @@ static void musb_free(struct musb *musb)musb_platform_exit (musb);musb_writeb (musb->mregs,MUSB_DEVCTL ,0 ); -if (musb->clock) { -clk_disable (musb->clock); -clk_put (musb->clock); - } +clk_disable (musb->clock); +clk_put (musb->clock);#ifdef CONFIG_USB_MUSB_HDRC_HCD usb_put_hcd (musb_to_hcd (musb));@@ -1930,7 +1926,6 @@ bad_config:spin_lock_init (&musb->lock); musb->board_mode = plat->mode; musb->board_set_power = plat->set_power; - musb->set_clock = plat->set_clock; musb->min_power = plat->min_power;/* Clock usage is chip-specific ... functional clock (DaVinci, @@ -1938,15 +1933,17 @@ bad_config:* code does is make sure a clock handle is available; platform * code manages it during start/stop and suspend/resume.
drivers/usb/musb/musb_core.c bad_config: · line 1937
Quoted 10 lines
drivers/usb/musb/musb_core.c +1
-7*/ -if (plat->clock) { - musb->clock =clk_get (dev, plat->clock); -if (IS_ERR (musb->clock)) { - status =PTR_ERR (musb->clock); - musb->clock =NULL ; - goto fail; - } + musb->clock =clk_get (dev,"ick" );
Why always "ick"?! Do you think OMAPs are the only boards using MUSB
out there?
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 7/9 usb: musb: use only clk framework for clk handling
Hi,
Quoted 2 lines · Sergei Shtylyov
Why always "ick"?! Do you think OMAPs are the only boards using MUSB
out there?
err, I'm afraid you have to read more about clock framework. The clock name should not matter when you issue clk_get(). I used the shortest name that came to my mind. could've been "usb", "usb_clock", "musb_otg_default_clock". It doesn't matter.
Signature · 1 line
balbi
Re: [patch-v2.6.34 7/9] usb: musb: use only clk framework for clk handling
Hello.
Quoted 6 lines · Felipe Balbi
Quoted 3 lines
Why always "ick"?! Do you think OMAPs are the only boards using MUSB
out there?err, I'm afraid you have to read more about clock framework. The clock name should not matter when you issue
clk_get().
It depends on the matching type determined from a clkdev matching
table -- see dm644x_clks[] in arch/mach-davinci/dm644x.c as an example: 'struct davinci_clk' incorporates 'struct clk_lookup', and where its 1st member is initialized, the matching is done by device, where its second member is initialized, the matching is done by clock name -- see clk_find() in arch/arm/common/clkdev.c for the logic.
Quoted 3 lines
I used the shortest
name that came to my mind. could've been "usb", "usb_clock", "musb_otg_default_clock". It doesn't matter.
I know for sure that it still *can* matter with clkdev, and I do use
matching by clock name with DA8xx/OMAP-L1x glue layer. So I' strongly against this patch.
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 7/9 usb: musb: use only clk framework for clk handling
Hi,
Quoted 11 lines · Sergei Shtylyov
Hello.
Quoted 6 lines · Felipe Balbi
Quoted 3 lines
Why always "ick"?! Do you think OMAPs are the only boards using MUSB
out there?err, I'm afraid you have to read more about clock framework. The clock name should not matter when you issue
clk_get().
Quoted 6 lines
It depends on the matching type determined from a clkdev matching
table -- see dm644x_clks[] inarch/mach-davinci/dm644x.cas an example:
'structdavinci_clk' incorporates 'structclk_lookup', and where its 1st member is initialized, the matching is done by device, where its second member is initialized, the matching is done by clock name -- seeclk_find()inarch/arm/common/clkdev.cfor the logic.
(quoted diff) +0 -0
b/arch/arm/mach-davinci/dm644x.c
index 2cd0081..a0ad7b6 100644
arch/arm/mach-davinci/dm644x.c +1 -1
@@ -306,7 +306,7 @@ struct davinci_clk dm644x_clks[] = {CLK ("davinci_mmc.0" ,NULL , &mmcsd_clk),CLK (NULL ,"spi" , &spi_clk),CLK (NULL ,"gpio" , &gpio_clk), -CLK (NULL ,"usb" , &usb_clk), +CLK ("musb_hdrc" ,"usb" , &usb_clk),CLK (NULL ,"vlynq" , &vlynq_clk),CLK (NULL ,"aemif" , &aemif_clk), CLK(NULL, "pwm0", &pwm0_clk),
there you are...
Signature · 1 line
balbi
PATCH 7/9 usb: musb: use only clk framework for clk handling
Hi,
adding Russell to Cc list as he might have comments.
Quoted 37 lines · Felipe Balbi
Hi,
Quoted 17 lines · Sergei Shtylyov
Hello.
Quoted 6 lines · Felipe Balbi
Quoted 3 lines
Why always "ick"?! Do you think OMAPs are the only boards using MUSB
out there?err, I'm afraid you have to read more about clock framework. The clock name should not matter when you issue
clk_get().It depends on the matching type determined from a clkdev matching
table -- see dm644x_clks[] inarch/mach-davinci/dm644x.cas an example:
'structdavinci_clk' incorporates 'structclk_lookup', and where its 1st member is initialized, the matching is done by device, where its second member is initialized, the matching is done by clock name -- seeclk_find()inarch/arm/common/clkdev.cfor the logic.arch/arm/mach-davinci/dm644x.c +1
-1@@ -306,7 +306,7 @@ struct davinci_clk dm644x_clks[] = {CLK ("davinci_mmc.0" ,NULL , &mmcsd_clk),CLK (NULL ,"spi" , &spi_clk),CLK (NULL ,"gpio" , &gpio_clk), -CLK (NULL ,"usb" , &usb_clk), +CLK ("musb_hdrc" ,"usb" , &usb_clk),CLK (NULL ,"vlynq" , &vlynq_clk),CLK (NULL ,"aemif" , &aemif_clk), CLK(NULL, "pwm0", &pwm0_clk),
Quoted 1 line
there you are...
and the point is that we want to stop passing clock names down to the driver so either we agree on using a generic name like "ick" or "usb", or the clockdev implementation for that particular clock will match device id. We sure need to think about clocks used by several devices, we want to keep device id NULL, for sure.
Russell, how should we tackle this ?
Signature · 1 line
balbi
Re: [patch-v2.6.34 7/9] usb: musb: use only clk framework for clk handling
In reply to Felipe BalbiHello.
Quoted 27 lines · Felipe Balbi
Quoted 10 lines
Quoted 7 lines
Quoted 4 lines
Why always "ick"?! Do you think OMAPs are the only boards using MUSB
out there?err, I'm afraid you have to read more about clock framework. The clock name should not matter when you issue
clk_get().It depends on the matching type determined from a clkdev matching
table -- see dm644x_clks[] inarch/mach-davinci/dm644x.cas an example: 'structdavinci_clk' incorporates 'structclk_lookup', and where its 1st member is initialized, the matching is done by device, where its second member is initialized, the matching is done by clock name -- seeclk_find()inarch/arm/common/clkdev.cfor the logic.arch/arm/mach-davinci/dm644x.c +1
-1@@ -306,7 +306,7 @@ struct davinci_clk dm644x_clks[] = {CLK ("davinci_mmc.0" ,NULL , &mmcsd_clk),CLK (NULL ,"spi" , &spi_clk),CLK (NULL ,"gpio" , &gpio_clk), -CLK (NULL ,"usb" , &usb_clk), +CLK ("musb_hdrc" ,"usb" , &usb_clk),CLK (NULL ,"vlynq" , &vlynq_clk),CLK (NULL ,"aemif" , &aemif_clk), CLK(NULL, "pwm0", &pwm0_clk),
Quoted 1 line
there you are...
Gotcha. This will match in clk_find() by both device and clock name,
so clk_get() will fail with your patch.
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 7/9 usb: musb: use only clk framework for clk handling
Quoted 2 lines · Sergei Shtylyov
Gotcha. This will match in
clk_find()by both device and clock name,
soclk_get()will fail with your patch.
then, when it doesn't find, it'll try device id only:
/*
* Find the correct struct clk for the device and connection ID.
* We do slightly fuzzy matching here:
* An entry with a NULL ID is assumed to be a wildcard. * If an entry has a device ID, it must match * If an entry has a connection ID, it must match
* Then we take the most specific entry - with the following
* order of precidence: dev+con > dev only > con only. */
and then we have found our clock :-)
Signature · 1 line
balbi
Re: [patch-v2.6.34 7/9] usb: musb: use only clk framework for clk handling
Hello.
Quoted 9 lines · Felipe Balbi
Quoted 3 lines
Gotcha. This will match in
clk_find()by both device and clock name,
soclk_get()will fail with your patch.then, when it doesn't find, it'll try device id only:
/*
* Find the correct struct clk for the device and connection ID.
* We do slightly fuzzy matching here:
Quoted 8 lines
* An entry with a NULL ID is assumed to be a wildcard. * If an entry has a device ID, it must match * If an entry has a connection ID, it must match* Then we take the most specific entry - with the following
* order of precidence: dev+con > dev only > con only. */and then we have found our clock :-)
Hm, you're right, I haven't completely followed the logic there... in
any case, specifying con_id wasn't really needed.
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 7/9 usb: musb: use only clk framework for clk handling
Hi,
Quoted 10 lines · Sergei Shtylyov
Quoted 10 lines
/*
* Find the correct struct clk for the device and connection ID.
* We do slightly fuzzy matching here:* An entry with a NULL ID is assumed to be a wildcard. * If an entry has a device ID, it must match * If an entry has a connection ID, it must match* Then we take the most specific entry - with the following
* order of precidence: dev+con > dev only > con only. */
Quoted 4 lines
Quoted 1 line
and then we have found our clock :-)
Hm, you're right, I haven't completely followed the logic there... in
any case, specifyingcon_idwasn't really needed.
good we've sorted things out. Want me to send a patch for the device id to davinci tree or can you take care of that ?
I have a for-kevin branch with a few patches I'll send to davinci tree so I could add the device id patch there.
Signature · 1 line
balbi
Re: [patch-v2.6.34 7/9] usb: musb: use only clk framework for clk handling
Hello.
Quoted 16 lines · Felipe Balbi
Quoted 10 lines
Quoted 10 lines
/*
* Find the correct struct clk for the device and connection ID.
* We do slightly fuzzy matching here:* An entry with a NULL ID is assumed to be a wildcard. * If an entry has a device ID, it must match * If an entry has a connection ID, it must match* Then we take the most specific entry - with the following
* order of precidence: dev+con > dev only > con only. */Quoted 5 lines
Quoted 2 lines
and then we have found our clock :-)
Hm, you're right, I haven't completely followed the logic there... in
any case, specifyingcon_idwasn't really needed.
Quoted 5 lines
good we've sorted things out. Want me to send a patch for the device id to davinci tree or can you take care of that ?
I have a for-kevin branch with a few patches I'll send to davinci tree so I could add the device id patch there.
Go ahead, I'm actually ill now.
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 8/9 arm: omap: musb: do not pass clock name to driver
In reply to Felipe Balbiwe are using clkdev and the driver can use whatever name it wants.
--- arch/arm/mach-omap2/usb-musb.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/usb-musb.c +0 -6
@@ -55,7 +55,6 @@ static struct musb_hdrc_config musb_config = { };static struct musb_hdrc_platform_data musb_plat = { -/* .clock is set dynamically */ .config = &musb_config,/* .power = DYNAMIC, */ /* .mode = DYNAMIC, */
@@ -83,11 +82,6 @@ void __init usb_musb_init(enum musb_mode mode, unsigned power) musb_resources[0 ].start =OMAP34XX_HSUSB_OTG_BASE ; musb_resources[0 ].end = musb_resources[0 ].start +SZ_4K -1 ; -/* -* REVISIT: This line can be removed once all the platforms using -* musb_core.c have been converted to use use clkdev. -*/ - musb_plat.clock ="ick" ; musb_plat.power = power >>1 ; musb_plat.mode = mode;
Signature · 1 line
1.6.6.35.g1d85d
Re: [patch-v2.6.34 8/9] arm: omap: musb: do not pass clock name to driver
Hello.
Quoted 3 lines · Felipe Balbi
we are using clkdev and the driver can use whatever name it wants.
It's not so actually. This depends on the matching mechanism
established within clkdev: by device, by name, or by both. Not all implementations will match by device, e.g. DA8xx/OMAP-L1x will match by clock name.
WBR, Sergei
PATCH 8/9 arm: omap: musb: do not pass clock name to driver
Hi,
Quoted 4 lines · Sergei Shtylyov
It's not so actually. This depends on the matching mechanism
established within clkdev: by device, by name, or by both. Not all implementations will match by device, e.g. DA8xx/OMAP-L1x will match by clock name.
then it has to be fixed. The name shouldn't matter. This was a big discussion when Russell came up with the clkdev stuff and I remember clearly that clock names shouldn't be passed down to drivers because they don't matter.
Signature · 1 line
balbi
Re: [patch-v2.6.34 8/9] arm: omap: musb: do not pass clock name to driver
Hello.
Quoted 5 lines · Felipe Balbi
Quoted 3 lines
It's not so actually. This depends on the matching mechanism
established within clkdev: by device, by name, or by both. Not all implementations will match by device, e.g. DA8xx/OMAP-L1x will match by clock name.then it has to be fixed. The name shouldn't matter.
It's not always feasible to do as you say. The same clock can be used
by more than two drivers, or the clock may be used out of driver context altogether.
Quoted 4 lines
This was a big
discussion when Russell came up with the clkdev stuff and I remember clearly that clock names shouldn't be passed down to drivers because they don't matter.
Why then there are two matching mechanisms in the clkdev code?
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 9/9 arm: omap: musb: get rid of dyn_fifo
In reply to Felipe Balbithat's deprecated as we can check dyn_fifo from
CONFIGDATA register.
--- arch/arm/mach-omap2/usb-musb.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/usb-musb.c +0 -1
@@ -49,7 +49,6 @@ static struct resource musb_resources[] = {static struct musb_hdrc_config musb_config = { .multipoint =1 , - .dyn_fifo =1 , .num_eps =16 , .ram_bits =12 , };
Signature · 1 line
1.6.6.35.g1d85d