diff options
Diffstat (limited to 'arch/arm/mach-shmobile/include')
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h | 21 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/sdhi.h | 16 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/sh7372.h | 33 |
3 files changed, 70 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h b/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h new file mode 100644 index 00000000000..4a81b01f1e8 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef SDHI_SH7372_H | ||
2 | #define SDHI_SH7372_H | ||
3 | |||
4 | #define SDGENCNTA 0xfe40009c | ||
5 | |||
6 | /* The countdown of SDGENCNTA is controlled by | ||
7 | * ZB3D2CLK which runs at 149.5MHz. | ||
8 | * That is 149.5ticks/us. Approximate this as 150ticks/us. | ||
9 | */ | ||
10 | static void udelay(int us) | ||
11 | { | ||
12 | __raw_writel(us * 150, SDGENCNTA); | ||
13 | while(__raw_readl(SDGENCNTA)) ; | ||
14 | } | ||
15 | |||
16 | static void msleep(int ms) | ||
17 | { | ||
18 | udelay(ms * 1000); | ||
19 | } | ||
20 | |||
21 | #endif | ||
diff --git a/arch/arm/mach-shmobile/include/mach/sdhi.h b/arch/arm/mach-shmobile/include/mach/sdhi.h new file mode 100644 index 00000000000..0ec9e69f2c3 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/sdhi.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef SDHI_H | ||
2 | #define SDHI_H | ||
3 | |||
4 | /************************************************** | ||
5 | * | ||
6 | * CPU specific settings | ||
7 | * | ||
8 | **************************************************/ | ||
9 | |||
10 | #ifdef CONFIG_ARCH_SH7372 | ||
11 | #include "mach/sdhi-sh7372.h" | ||
12 | #else | ||
13 | #error "unsupported CPU." | ||
14 | #endif | ||
15 | |||
16 | #endif /* SDHI_H */ | ||
diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h index df20d767017..24e63a85e66 100644 --- a/arch/arm/mach-shmobile/include/mach/sh7372.h +++ b/arch/arm/mach-shmobile/include/mach/sh7372.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #define __ASM_SH7372_H__ | 12 | #define __ASM_SH7372_H__ |
13 | 13 | ||
14 | #include <linux/sh_clk.h> | 14 | #include <linux/sh_clk.h> |
15 | #include <linux/pm_domain.h> | ||
15 | 16 | ||
16 | /* | 17 | /* |
17 | * Pin Function Controller: | 18 | * Pin Function Controller: |
@@ -458,6 +459,10 @@ enum { | |||
458 | SHDMA_SLAVE_SDHI2_TX, | 459 | SHDMA_SLAVE_SDHI2_TX, |
459 | SHDMA_SLAVE_MMCIF_RX, | 460 | SHDMA_SLAVE_MMCIF_RX, |
460 | SHDMA_SLAVE_MMCIF_TX, | 461 | SHDMA_SLAVE_MMCIF_TX, |
462 | SHDMA_SLAVE_USB0_TX, | ||
463 | SHDMA_SLAVE_USB0_RX, | ||
464 | SHDMA_SLAVE_USB1_TX, | ||
465 | SHDMA_SLAVE_USB1_RX, | ||
461 | }; | 466 | }; |
462 | 467 | ||
463 | extern struct clk sh7372_extal1_clk; | 468 | extern struct clk sh7372_extal1_clk; |
@@ -470,4 +475,32 @@ extern struct clk sh7372_fsibck_clk; | |||
470 | extern struct clk sh7372_fsidiva_clk; | 475 | extern struct clk sh7372_fsidiva_clk; |
471 | extern struct clk sh7372_fsidivb_clk; | 476 | extern struct clk sh7372_fsidivb_clk; |
472 | 477 | ||
478 | struct platform_device; | ||
479 | |||
480 | struct sh7372_pm_domain { | ||
481 | struct generic_pm_domain genpd; | ||
482 | unsigned int bit_shift; | ||
483 | }; | ||
484 | |||
485 | static inline struct sh7372_pm_domain *to_sh7372_pd(struct generic_pm_domain *d) | ||
486 | { | ||
487 | return container_of(d, struct sh7372_pm_domain, genpd); | ||
488 | } | ||
489 | |||
490 | #ifdef CONFIG_PM | ||
491 | extern struct sh7372_pm_domain sh7372_a4lc; | ||
492 | extern struct sh7372_pm_domain sh7372_a4mp; | ||
493 | extern struct sh7372_pm_domain sh7372_d4; | ||
494 | extern struct sh7372_pm_domain sh7372_a3rv; | ||
495 | extern struct sh7372_pm_domain sh7372_a3ri; | ||
496 | extern struct sh7372_pm_domain sh7372_a3sg; | ||
497 | |||
498 | extern void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd); | ||
499 | extern void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd, | ||
500 | struct platform_device *pdev); | ||
501 | #else | ||
502 | #define sh7372_init_pm_domain(pd) do { } while(0) | ||
503 | #define sh7372_add_device_to_domain(pd, pdev) do { } while(0) | ||
504 | #endif /* CONFIG_PM */ | ||
505 | |||
473 | #endif /* __ASM_SH7372_H__ */ | 506 | #endif /* __ASM_SH7372_H__ */ |