summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-s5pc1xx/clk.h32
-rw-r--r--include/asm-arm/arch-s5pc1xx/clock.h94
-rw-r--r--include/asm-arm/arch-s5pc1xx/cpu.h72
-rw-r--r--include/asm-arm/arch-s5pc1xx/gpio.h129
-rw-r--r--include/asm-arm/arch-s5pc1xx/power.h42
-rw-r--r--include/asm-arm/arch-s5pc1xx/pwm.h59
-rw-r--r--include/asm-arm/arch-s5pc1xx/uart.h47
7 files changed, 475 insertions, 0 deletions
diff --git a/include/asm-arm/arch-s5pc1xx/clk.h b/include/asm-arm/arch-s5pc1xx/clk.h
new file mode 100644
index 0000000..f1aa44f
--- /dev/null
+++ b/include/asm-arm/arch-s5pc1xx/clk.h
@@ -0,0 +1,32 @@
+/*
+ * (C) Copyright 2009 Samsung Electronics
+ * Minkyu Kang <mk7.kang@samsung.com>
+ * Heungjun Kim <riverful.kim@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#ifndef __ASM_ARM_ARCH_CLK_H_
+#define __ASM_ARM_ARCH_CLK_H_
+
+void s5pc1xx_clock_init(void);
+
+extern unsigned long (*get_pll_clk)(int pllreg);
+extern unsigned long (*get_arm_clk)(void);
+extern unsigned long (*get_pclk)(void);
+
+#endif
diff --git a/include/asm-arm/arch-s5pc1xx/clock.h b/include/asm-arm/arch-s5pc1xx/clock.h
new file mode 100644
index 0000000..0cad922
--- /dev/null
+++ b/include/asm-arm/arch-s5pc1xx/clock.h
@@ -0,0 +1,94 @@
+/*
+ * (C) Copyright 2009 Samsung Electronics
+ * Minkyu Kang <mk7.kang@samsung.com>
+ * Heungjun Kim <riverful.kim@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#ifndef __ASM_ARM_ARCH_CLOCK_H_
+#define __ASM_ARM_ARCH_CLOCK_H_
+
+#ifndef __ASSEMBLY__
+struct s5pc100_clock {
+ unsigned long apll_lock;
+ unsigned long mpll_lock;
+ unsigned long epll_lock;
+ unsigned long hpll_lock;
+ unsigned char res1[0xf0];
+ unsigned long apll_con;
+ unsigned long mpll_con;
+ unsigned long epll_con;
+ unsigned long hpll_con;
+ unsigned char res2[0xf0];
+ unsigned long src0;
+ unsigned long src1;
+ unsigned long src2;
+ unsigned long src3;
+ unsigned char res3[0xf0];
+ unsigned long div0;
+ unsigned long div1;
+ unsigned long div2;
+ unsigned long div3;
+ unsigned long div4;
+ unsigned char res4[0x1ec];
+ unsigned long gate_d00;
+ unsigned long gate_d01;
+ unsigned long gate_d02;
+ unsigned char res5[0x54];
+ unsigned long gate_sclk0;
+ unsigned long gate_sclk1;
+};
+
+struct s5pc110_clock {
+ unsigned long apll_lock;
+ unsigned char res1[0x4];
+ unsigned long mpll_lock;
+ unsigned char res2[0x4];
+ unsigned long epll_lock;
+ unsigned char res3[0xc];
+ unsigned long vpll_lock;
+ unsigned char res4[0xdc];
+ unsigned long apll_con;
+ unsigned char res5[0x4];
+ unsigned long mpll_con;
+ unsigned char res6[0x4];
+ unsigned long epll_con;
+ unsigned char res7[0xc];
+ unsigned long vpll_con;
+ unsigned char res8[0xdc];
+ unsigned long src0;
+ unsigned long src1;
+ unsigned long src2;
+ unsigned long src3;
+ unsigned char res9[0xf0];
+ unsigned long div0;
+ unsigned long div1;
+ unsigned long div2;
+ unsigned long div3;
+ unsigned long div4;
+ unsigned char res10[0x1ec];
+ unsigned long gate_d00;
+ unsigned long gate_d01;
+ unsigned long gate_d02;
+ unsigned char res11[0x54];
+ unsigned long gate_sclk0;
+ unsigned long gate_sclk1;
+};
+#endif
+
+#endif
diff --git a/include/asm-arm/arch-s5pc1xx/cpu.h b/include/asm-arm/arch-s5pc1xx/cpu.h
new file mode 100644
index 0000000..90485aa
--- /dev/null
+++ b/include/asm-arm/arch-s5pc1xx/cpu.h
@@ -0,0 +1,72 @@
+/*
+ * (C) Copyright 2009 Samsung Electronics
+ * Minkyu Kang <mk7.kang@samsung.com>
+ * Heungjun Kim <riverful.kim@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#ifndef _S5PC1XX_CPU_H
+#define _S5PC1XX_CPU_H
+
+#define S5PC1XX_ADDR_BASE 0xE0000000
+
+#define S5PC1XX_CLOCK_BASE 0xE0100000
+
+/* S5PC100 */
+#define S5PC100_GPIO_BASE 0xE0300000
+#define S5PC100_VIC0_BASE 0xE4000000
+#define S5PC100_VIC1_BASE 0xE4100000
+#define S5PC100_VIC2_BASE 0xE4200000
+#define S5PC100_DMC_BASE 0xE6000000
+#define S5PC100_SROMC_BASE 0xE7000000
+#define S5PC100_ONENAND_BASE 0xE7100000
+#define S5PC100_PWMTIMER_BASE 0xEA000000
+#define S5PC100_WATCHDOG_BASE 0xEA200000
+#define S5PC100_UART_BASE 0xEC000000
+
+/* S5PC110 */
+#define S5PC110_GPIO_BASE 0xE0200000
+#define S5PC110_PWMTIMER_BASE 0xE2500000
+#define S5PC110_WATCHDOG_BASE 0xE2700000
+#define S5PC110_UART_BASE 0xE2900000
+#define S5PC110_SROMC_BASE 0xE8000000
+#define S5PC110_DMC0_BASE 0xF0000000
+#define S5PC110_DMC1_BASE 0xF1400000
+#define S5PC110_VIC0_BASE 0xF2000000
+#define S5PC110_VIC1_BASE 0xF2100000
+#define S5PC110_VIC2_BASE 0xF2200000
+#define S5PC110_VIC3_BASE 0xF2300000
+
+/* Chip ID */
+#define S5PC1XX_PRO_ID 0xE0000000
+
+#ifndef __ASSEMBLY__
+/* CPU detection macros */
+extern unsigned int s5pc1xx_cpu_id;
+
+#define IS_SAMSUNG_TYPE(type, id) \
+static inline int cpu_is_##type(void) \
+{ \
+ return s5pc1xx_cpu_id == id ? 1 : 0; \
+}
+
+IS_SAMSUNG_TYPE(s5pc100, 0xc100)
+IS_SAMSUNG_TYPE(s5pc110, 0xc110)
+#endif
+
+#endif /* _S5PC1XX_CPU_H */
diff --git a/include/asm-arm/arch-s5pc1xx/gpio.h b/include/asm-arm/arch-s5pc1xx/gpio.h
new file mode 100644
index 0000000..0010405
--- /dev/null
+++ b/include/asm-arm/arch-s5pc1xx/gpio.h
@@ -0,0 +1,129 @@
+/*
+ * (C) Copyright 2009 Samsung Electronics
+ * Minkyu Kang <mk7.kang@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __ASM_ARCH_GPIO_H
+#define __ASM_ARCH_GPIO_H
+
+#ifndef __ASSEMBLY__
+struct s5pc1xx_gpio_bank {
+ unsigned long con;
+ unsigned long dat;
+ unsigned long pull;
+ unsigned long drv;
+ unsigned long pdn_con;
+ unsigned long pdn_pull;
+ unsigned char res1[8];
+};
+
+struct s5pc100_gpio {
+ struct s5pc1xx_gpio_bank gpio_a0;
+ struct s5pc1xx_gpio_bank gpio_a1;
+ struct s5pc1xx_gpio_bank gpio_b;
+ struct s5pc1xx_gpio_bank gpio_c;
+ struct s5pc1xx_gpio_bank gpio_d;
+ struct s5pc1xx_gpio_bank gpio_e0;
+ struct s5pc1xx_gpio_bank gpio_e1;
+ struct s5pc1xx_gpio_bank gpio_f0;
+ struct s5pc1xx_gpio_bank gpio_f1;
+ struct s5pc1xx_gpio_bank gpio_f2;
+ struct s5pc1xx_gpio_bank gpio_f3;
+ struct s5pc1xx_gpio_bank gpio_g0;
+ struct s5pc1xx_gpio_bank gpio_g1;
+ struct s5pc1xx_gpio_bank gpio_g2;
+ struct s5pc1xx_gpio_bank gpio_g3;
+ struct s5pc1xx_gpio_bank gpio_i;
+ struct s5pc1xx_gpio_bank gpio_j0;
+ struct s5pc1xx_gpio_bank gpio_j1;
+ struct s5pc1xx_gpio_bank gpio_j2;
+ struct s5pc1xx_gpio_bank gpio_j3;
+ struct s5pc1xx_gpio_bank gpio_j4;
+ struct s5pc1xx_gpio_bank gpio_k0;
+ struct s5pc1xx_gpio_bank gpio_k1;
+ struct s5pc1xx_gpio_bank gpio_k2;
+ struct s5pc1xx_gpio_bank gpio_k3;
+ struct s5pc1xx_gpio_bank gpio_l0;
+ struct s5pc1xx_gpio_bank gpio_l1;
+ struct s5pc1xx_gpio_bank gpio_l2;
+ struct s5pc1xx_gpio_bank gpio_l3;
+ struct s5pc1xx_gpio_bank gpio_l4;
+ struct s5pc1xx_gpio_bank gpio_h0;
+ struct s5pc1xx_gpio_bank gpio_h1;
+ struct s5pc1xx_gpio_bank gpio_h2;
+ struct s5pc1xx_gpio_bank gpio_h3;
+};
+
+struct s5pc110_gpio {
+ struct s5pc1xx_gpio_bank gpio_a0;
+ struct s5pc1xx_gpio_bank gpio_a1;
+ struct s5pc1xx_gpio_bank gpio_b;
+ struct s5pc1xx_gpio_bank gpio_c0;
+ struct s5pc1xx_gpio_bank gpio_c1;
+ struct s5pc1xx_gpio_bank gpio_d0;
+ struct s5pc1xx_gpio_bank gpio_d1;
+ struct s5pc1xx_gpio_bank gpio_e0;
+ struct s5pc1xx_gpio_bank gpio_e1;
+ struct s5pc1xx_gpio_bank gpio_f0;
+ struct s5pc1xx_gpio_bank gpio_f1;
+ struct s5pc1xx_gpio_bank gpio_f2;
+ struct s5pc1xx_gpio_bank gpio_f3;
+ struct s5pc1xx_gpio_bank gpio_g0;
+ struct s5pc1xx_gpio_bank gpio_g1;
+ struct s5pc1xx_gpio_bank gpio_g2;
+ struct s5pc1xx_gpio_bank gpio_g3;
+ struct s5pc1xx_gpio_bank gpio_i;
+ struct s5pc1xx_gpio_bank gpio_j0;
+ struct s5pc1xx_gpio_bank gpio_j1;
+ struct s5pc1xx_gpio_bank gpio_j2;
+ struct s5pc1xx_gpio_bank gpio_j3;
+ struct s5pc1xx_gpio_bank gpio_j4;
+ struct s5pc1xx_gpio_bank gpio_mp0_1;
+ struct s5pc1xx_gpio_bank gpio_mp0_2;
+ struct s5pc1xx_gpio_bank gpio_mp0_3;
+ struct s5pc1xx_gpio_bank gpio_mp0_4;
+ struct s5pc1xx_gpio_bank gpio_mp0_5;
+ struct s5pc1xx_gpio_bank gpio_mp0_6;
+ struct s5pc1xx_gpio_bank gpio_mp0_7;
+ struct s5pc1xx_gpio_bank gpio_mp1_0;
+ struct s5pc1xx_gpio_bank gpio_mp1_1;
+ struct s5pc1xx_gpio_bank gpio_mp1_2;
+ struct s5pc1xx_gpio_bank gpio_mp1_3;
+ struct s5pc1xx_gpio_bank gpio_mp1_4;
+ struct s5pc1xx_gpio_bank gpio_mp1_5;
+ struct s5pc1xx_gpio_bank gpio_mp1_6;
+ struct s5pc1xx_gpio_bank gpio_mp1_7;
+ struct s5pc1xx_gpio_bank gpio_mp1_8;
+ struct s5pc1xx_gpio_bank gpio_mp2_0;
+ struct s5pc1xx_gpio_bank gpio_mp2_1;
+ struct s5pc1xx_gpio_bank gpio_mp2_2;
+ struct s5pc1xx_gpio_bank gpio_mp2_3;
+ struct s5pc1xx_gpio_bank gpio_mp2_4;
+ struct s5pc1xx_gpio_bank gpio_mp2_5;
+ struct s5pc1xx_gpio_bank gpio_mp2_6;
+ struct s5pc1xx_gpio_bank gpio_mp2_7;
+ struct s5pc1xx_gpio_bank gpio_mp2_8;
+ struct s5pc1xx_gpio_bank res1[48];
+ struct s5pc1xx_gpio_bank gpio_h0;
+ struct s5pc1xx_gpio_bank gpio_h1;
+ struct s5pc1xx_gpio_bank gpio_h2;
+ struct s5pc1xx_gpio_bank gpio_h3;
+};
+#endif
+
+#endif
diff --git a/include/asm-arm/arch-s5pc1xx/power.h b/include/asm-arm/arch-s5pc1xx/power.h
new file mode 100644
index 0000000..57e2a2b
--- /dev/null
+++ b/include/asm-arm/arch-s5pc1xx/power.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2009 Samsung Electronics
+ * Kyungmin Park <kyungmin.park@samsung.com>
+ * Minkyu Kang <mk7.kang@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#ifndef __ASM_ARM_ARCH_POWER_H_
+#define __ASM_ARM_ARCH_POWER_H_
+
+/*
+ * Power control
+ */
+#define S5PC100_OTHERS 0xE0108200
+#define S5PC100_RST_STAT 0xE0108300
+#define S5PC100_SLEEP_WAKEUP (1 << 3)
+#define S5PC100_WAKEUP_STAT 0xE0108304
+#define S5PC100_INFORM0 0xE0108400
+
+#define S5PC110_RST_STAT 0xE010A000
+#define S5PC110_SLEEP_WAKEUP (1 << 3)
+#define S5PC110_WAKEUP_STAT 0xE010C200
+#define S5PC110_OTHERS 0xE010E000
+#define S5PC110_USB_PHY_CON 0xE010E80C
+#define S5PC110_INFORM0 0xE010F000
+
+#endif
diff --git a/include/asm-arm/arch-s5pc1xx/pwm.h b/include/asm-arm/arch-s5pc1xx/pwm.h
new file mode 100644
index 0000000..53c23cd
--- /dev/null
+++ b/include/asm-arm/arch-s5pc1xx/pwm.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2009 Samsung Electronics
+ * Kyungmin Park <kyungmin.park@samsung.com>
+ * Minkyu Kang <mk7.kang@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __ASM_ARM_ARCH_PWM_H_
+#define __ASM_ARM_ARCH_PWM_H_
+
+/* PWM timer addressing */
+#define S5PC100_TIMER_BASE S5PC100_PWMTIMER_BASE
+#define S5PC110_TIMER_BASE S5PC110_PWMTIMER_BASE
+
+/* Interval mode(Auto Reload) of PWM Timer 4 */
+#define S5PC1XX_TCON4_AUTO_RELOAD (1 << 22)
+/* Update TCNTB4 */
+#define S5PC1XX_TCON4_UPDATE (1 << 21)
+/* start bit of PWM Timer 4 */
+#define S5PC1XX_TCON4_START (1 << 20)
+
+#ifndef __ASSEMBLY__
+struct s5pc1xx_timer {
+ unsigned long tcfg0;
+ unsigned long tcfg1;
+ unsigned long tcon;
+ unsigned long tcntb0;
+ unsigned long tcmpb0;
+ unsigned long tcnto0;
+ unsigned long tcntb1;
+ unsigned long tcmpb1;
+ unsigned long tcnto1;
+ unsigned long tcntb2;
+ unsigned long tcmpb2;
+ unsigned long tcnto2;
+ unsigned long tcntb3;
+ unsigned long res1;
+ unsigned long tcnto3;
+ unsigned long tcntb4;
+ unsigned long tcnto4;
+ unsigned long tintcstat;
+};
+#endif /* __ASSEMBLY__ */
+
+#endif
diff --git a/include/asm-arm/arch-s5pc1xx/uart.h b/include/asm-arm/arch-s5pc1xx/uart.h
new file mode 100644
index 0000000..bd7d6b2
--- /dev/null
+++ b/include/asm-arm/arch-s5pc1xx/uart.h
@@ -0,0 +1,47 @@
+/*
+ * (C) Copyright 2009 Samsung Electronics
+ * Minkyu Kang <mk7.kang@samsung.com>
+ * Heungjun Kim <riverful.kim@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#ifndef __ASM_ARCH_UART_H_
+#define __ASM_ARCH_UART_H_
+
+#ifndef __ASSEMBLY__
+struct s5pc1xx_uart {
+ unsigned long ulcon;
+ unsigned long ucon;
+ unsigned long ufcon;
+ unsigned long umcon;
+ unsigned long utrstat;
+ unsigned long uerstat;
+ unsigned long ufstat;
+ unsigned long umstat;
+ unsigned char utxh;
+ unsigned char res1[3];
+ unsigned char urxh;
+ unsigned char res2[3];
+ unsigned long ubrdiv;
+ unsigned short udivslot;
+ unsigned char res3[2];
+ unsigned char res4[0x3d0];
+};
+#endif /* __ASSEMBLY__ */
+
+#endif