aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-shmobile/include')
-rw-r--r--arch/arm/mach-shmobile/include/mach/sdhi-sh7372.h21
-rw-r--r--arch/arm/mach-shmobile/include/mach/sdhi.h16
-rw-r--r--arch/arm/mach-shmobile/include/mach/sh7372.h33
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 */
10static void udelay(int us)
11{
12 __raw_writel(us * 150, SDGENCNTA);
13 while(__raw_readl(SDGENCNTA)) ;
14}
15
16static 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
463extern struct clk sh7372_extal1_clk; 468extern struct clk sh7372_extal1_clk;
@@ -470,4 +475,32 @@ extern struct clk sh7372_fsibck_clk;
470extern struct clk sh7372_fsidiva_clk; 475extern struct clk sh7372_fsidiva_clk;
471extern struct clk sh7372_fsidivb_clk; 476extern struct clk sh7372_fsidivb_clk;
472 477
478struct platform_device;
479
480struct sh7372_pm_domain {
481 struct generic_pm_domain genpd;
482 unsigned int bit_shift;
483};
484
485static 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
491extern struct sh7372_pm_domain sh7372_a4lc;
492extern struct sh7372_pm_domain sh7372_a4mp;
493extern struct sh7372_pm_domain sh7372_d4;
494extern struct sh7372_pm_domain sh7372_a3rv;
495extern struct sh7372_pm_domain sh7372_a3ri;
496extern struct sh7372_pm_domain sh7372_a3sg;
497
498extern void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd);
499extern 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__ */