diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-17 21:16:55 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-17 21:16:55 -0400 |
commit | 4b337c5f245b6587ba844ac7bb13c313a2912f7b (patch) | |
tree | 999c6a6580b76a083c8efb9dabff709d1c49fcd0 /drivers/usb/host/r8a66597.h | |
parent | 492b057c426e4aa747484958e18e9da29003985d (diff) | |
parent | 3fe0344faf7fdcb158bd5c1a9aec960a8d70c8e8 (diff) |
Merge commit 'origin/master' into next
Diffstat (limited to 'drivers/usb/host/r8a66597.h')
-rw-r--r-- | drivers/usb/host/r8a66597.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/drivers/usb/host/r8a66597.h b/drivers/usb/host/r8a66597.h index f49208f1bb74..d72680b433f9 100644 --- a/drivers/usb/host/r8a66597.h +++ b/drivers/usb/host/r8a66597.h | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #include <linux/usb/r8a66597.h> | ||
34 | |||
33 | #define SYSCFG0 0x00 | 35 | #define SYSCFG0 0x00 |
34 | #define SYSCFG1 0x02 | 36 | #define SYSCFG1 0x02 |
35 | #define SYSSTS0 0x04 | 37 | #define SYSSTS0 0x04 |
@@ -488,6 +490,7 @@ struct r8a66597 { | |||
488 | #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK) | 490 | #if defined(CONFIG_SUPERH_ON_CHIP_R8A66597) && defined(CONFIG_HAVE_CLK) |
489 | struct clk *clk; | 491 | struct clk *clk; |
490 | #endif | 492 | #endif |
493 | struct r8a66597_platdata *pdata; | ||
491 | struct r8a66597_device device0; | 494 | struct r8a66597_device device0; |
492 | struct r8a66597_root_hub root_hub[R8A66597_MAX_ROOT_HUB]; | 495 | struct r8a66597_root_hub root_hub[R8A66597_MAX_ROOT_HUB]; |
493 | struct list_head pipe_queue[R8A66597_MAX_NUM_PIPE]; | 496 | struct list_head pipe_queue[R8A66597_MAX_NUM_PIPE]; |
@@ -506,6 +509,7 @@ struct r8a66597 { | |||
506 | unsigned long child_connect_map[4]; | 509 | unsigned long child_connect_map[4]; |
507 | 510 | ||
508 | unsigned bus_suspended:1; | 511 | unsigned bus_suspended:1; |
512 | unsigned irq_sense_low:1; | ||
509 | }; | 513 | }; |
510 | 514 | ||
511 | static inline struct r8a66597 *hcd_to_r8a66597(struct usb_hcd *hcd) | 515 | static inline struct r8a66597 *hcd_to_r8a66597(struct usb_hcd *hcd) |
@@ -660,10 +664,36 @@ static inline void r8a66597_port_power(struct r8a66597 *r8a66597, int port, | |||
660 | { | 664 | { |
661 | unsigned long dvstctr_reg = get_dvstctr_reg(port); | 665 | unsigned long dvstctr_reg = get_dvstctr_reg(port); |
662 | 666 | ||
663 | if (power) | 667 | if (r8a66597->pdata->port_power) { |
664 | r8a66597_bset(r8a66597, VBOUT, dvstctr_reg); | 668 | r8a66597->pdata->port_power(port, power); |
665 | else | 669 | } else { |
666 | r8a66597_bclr(r8a66597, VBOUT, dvstctr_reg); | 670 | if (power) |
671 | r8a66597_bset(r8a66597, VBOUT, dvstctr_reg); | ||
672 | else | ||
673 | r8a66597_bclr(r8a66597, VBOUT, dvstctr_reg); | ||
674 | } | ||
675 | } | ||
676 | |||
677 | static inline u16 get_xtal_from_pdata(struct r8a66597_platdata *pdata) | ||
678 | { | ||
679 | u16 clock = 0; | ||
680 | |||
681 | switch (pdata->xtal) { | ||
682 | case R8A66597_PLATDATA_XTAL_12MHZ: | ||
683 | clock = XTAL12; | ||
684 | break; | ||
685 | case R8A66597_PLATDATA_XTAL_24MHZ: | ||
686 | clock = XTAL24; | ||
687 | break; | ||
688 | case R8A66597_PLATDATA_XTAL_48MHZ: | ||
689 | clock = XTAL48; | ||
690 | break; | ||
691 | default: | ||
692 | printk(KERN_ERR "r8a66597: platdata clock is wrong.\n"); | ||
693 | break; | ||
694 | } | ||
695 | |||
696 | return clock; | ||
667 | } | 697 | } |
668 | 698 | ||
669 | #define get_pipectr_addr(pipenum) (PIPE1CTR + (pipenum - 1) * 2) | 699 | #define get_pipectr_addr(pipenum) (PIPE1CTR + (pipenum - 1) * 2) |