Skip to contentSkip to conversation

Samsung SoC common code updates

PATCH New Ben Dooks 1 participant 7 messages Jan 8, 2010

Subsystems (3)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

Updates for plat-samsung, moving items from plat-s3c and elsehwere into common places.

author
#1 lore raw

PATCH 1/1 ARM: SAMSUNG: Move pwm-clock code into plat-samsung

Move the code for the pwm-clock into plat-samsung, as it is common to all Samsung SoCs.

---
 arch/arm/plat-s3c/Makefile                      |    1 -
 arch/arm/plat-samsung/Makefile                  |    1 +
 arch/arm/{plat-s3c => plat-samsung}/pwm-clock.c |    0
 3 files changed, 1 insertions(+), 1 deletions(-)
 rename arch/arm/{plat-s3c => plat-samsung}/pwm-clock.c (100%)
arch/arm/plat-s3c/Makefile +0 -1
index 99f91ad..ef10a91 100644
@@ -13,7 +13,6 @@ obj-				:=
 
 obj-y				+= init.o
 obj-y				+= time.o
-obj-y				+= pwm-clock.o
 obj-y				+= gpio.o
 obj-y				+= gpio-config.o
 
arch/arm/plat-samsung/Makefile +1 -0
index 7612198..d4d5f94 100644
@@ -12,5 +12,6 @@ obj-				:=
 # Objects we always build independent of SoC choice
 
 obj-y				+= clock.o
+obj-y				+= pwm-clock.o
 
 obj-$(CONFIG_SAMSUNG_CLKSRC)	+= clock-clksrc.o
arch/arm/plat-samsung/pwm-clock.c renamed from arch/arm/plat-s3c/pwm-clock.c +0 -0
similarity index 100%
rename from arch/arm/plat-s3c/pwm-clock.c
rename to arch/arm/plat-samsung/pwm-clock.c
Signature · 1 line
1.6.0.4
author
#2 lore raw

PATCH 1/1 ARM: SAMSUNG: Move device definitions in plat-samsung

In reply to Ben Dooks

Move all the platform device definitions from plat-s3c into plat-samsung

---
 arch/arm/plat-s3c/Kconfig                          |   42 --------------------
 arch/arm/plat-s3c/Makefile                         |   12 ------
 arch/arm/plat-samsung/Kconfig                      |   42 ++++++++++++++++++++
 arch/arm/plat-samsung/Makefile                     |   12 ++++++
 arch/arm/{plat-s3c => plat-samsung}/dev-fb.c       |    0
 arch/arm/{plat-s3c => plat-samsung}/dev-hsmmc.c    |    0
 arch/arm/{plat-s3c => plat-samsung}/dev-hsmmc1.c   |    0
 arch/arm/{plat-s3c => plat-samsung}/dev-hsmmc2.c   |    0
 arch/arm/{plat-s3c => plat-samsung}/dev-i2c0.c     |    0
 arch/arm/{plat-s3c => plat-samsung}/dev-i2c1.c     |    0
 arch/arm/{plat-s3c => plat-samsung}/dev-nand.c     |    0
 .../arm/{plat-s3c => plat-samsung}/dev-usb-hsotg.c |    0
 arch/arm/{plat-s3c => plat-samsung}/dev-usb.c      |    0
 13 files changed, 54 insertions(+), 54 deletions(-)
 rename arch/arm/{plat-s3c => plat-samsung}/dev-fb.c (100%)
 rename arch/arm/{plat-s3c => plat-samsung}/dev-hsmmc.c (100%)
 rename arch/arm/{plat-s3c => plat-samsung}/dev-hsmmc1.c (100%)
 rename arch/arm/{plat-s3c => plat-samsung}/dev-hsmmc2.c (100%)
 rename arch/arm/{plat-s3c => plat-samsung}/dev-i2c0.c (100%)
 rename arch/arm/{plat-s3c => plat-samsung}/dev-i2c1.c (100%)
 rename arch/arm/{plat-s3c => plat-samsung}/dev-nand.c (100%)
 rename arch/arm/{plat-s3c => plat-samsung}/dev-usb-hsotg.c (100%)
 rename arch/arm/{plat-s3c => plat-samsung}/dev-usb.c (100%)
arch/arm/plat-s3c/Kconfig +0 -42
index 9e9d028..cd979b1 100644
@@ -170,46 +170,4 @@ config S3C_DMA
 	help
 	  Internal configuration for S3C DMA core
 
-# device definitions to compile in
-
-config S3C_DEV_HSMMC
-	bool
-	help
-	  Compile in platform device definitions for HSMMC code
-
-config S3C_DEV_HSMMC1
-	bool
-	help
-	  Compile in platform device definitions for HSMMC channel 1
-
-config S3C_DEV_HSMMC2
-	bool
-	help
-	  Compile in platform device definitions for HSMMC channel 2
-
-config S3C_DEV_I2C1
-	bool
-	help
-	  Compile in platform device definitions for I2C channel 1
-
-config S3C_DEV_FB
-	bool
-	help
-	  Compile in platform device definition for framebuffer
-
-config S3C_DEV_USB_HOST
-	bool
-	help
-	  Compile in platform device definition for USB host.
-
-config S3C_DEV_USB_HSOTG
-	bool
-	help
-	  Compile in platform device definition for USB high-speed OtG
-
-config S3C_DEV_NAND
-	bool
-	help
-	  Compile in platform device definition for NAND controller
-
 endif
arch/arm/plat-s3c/Makefile +0 -12
index ef10a91..d862995 100644
@@ -29,15 +29,3 @@ obj-$(CONFIG_S3C2410_PM_CHECK)	+= pm-check.o
 # PWM support
 
 obj-$(CONFIG_HAVE_PWM)		+= pwm.o
-
-# devices
-
-obj-$(CONFIG_S3C_DEV_HSMMC)	+= dev-hsmmc.o
-obj-$(CONFIG_S3C_DEV_HSMMC1)	+= dev-hsmmc1.o
-obj-$(CONFIG_S3C_DEV_HSMMC2)	+= dev-hsmmc2.o
-obj-y				+= dev-i2c0.o
-obj-$(CONFIG_S3C_DEV_I2C1)	+= dev-i2c1.o
-obj-$(CONFIG_S3C_DEV_FB)	+= dev-fb.o
-obj-$(CONFIG_S3C_DEV_USB_HOST)	+= dev-usb.o
-obj-$(CONFIG_S3C_DEV_USB_HSOTG)	+= dev-usb-hsotg.o
-obj-$(CONFIG_S3C_DEV_NAND)	+= dev-nand.o
arch/arm/plat-samsung/Kconfig +42 -0

46 lines not on this page · raw message

arch/arm/plat-samsung/Makefile +12 -0
index d4d5f94..32f03e5 100644
@@ -15,3 +15,15 @@ obj-y				+= clock.o
 obj-y				+= pwm-clock.o
 
 obj-$(CONFIG_SAMSUNG_CLKSRC)	+= clock-clksrc.o
+
+# devices
+
+obj-$(CONFIG_S3C_DEV_HSMMC)	+= dev-hsmmc.o
+obj-$(CONFIG_S3C_DEV_HSMMC1)	+= dev-hsmmc1.o
+obj-$(CONFIG_S3C_DEV_HSMMC2)	+= dev-hsmmc2.o
+obj-y				+= dev-i2c0.o
+obj-$(CONFIG_S3C_DEV_I2C1)	+= dev-i2c1.o
+obj-$(CONFIG_S3C_DEV_FB)	+= dev-fb.o
+obj-$(CONFIG_S3C_DEV_USB_HOST)	+= dev-usb.o
+obj-$(CONFIG_S3C_DEV_USB_HSOTG)	+= dev-usb-hsotg.o
+obj-$(CONFIG_S3C_DEV_NAND)	+= dev-nand.o
arch/arm/plat-samsung/dev-fb.c renamed from arch/arm/plat-s3c/dev-fb.c +0 -0
similarity index 100%
rename from arch/arm/plat-s3c/dev-fb.c
rename to arch/arm/plat-samsung/dev-fb.c
arch/arm/plat-samsung/dev-hsmmc.c renamed from arch/arm/plat-s3c/dev-hsmmc.c +0 -0
similarity index 100%
rename from arch/arm/plat-s3c/dev-hsmmc.c
rename to arch/arm/plat-samsung/dev-hsmmc.c
arch/arm/plat-samsung/dev-hsmmc1.c renamed from arch/arm/plat-s3c/dev-hsmmc1.c +0 -0
similarity index 100%
rename from arch/arm/plat-s3c/dev-hsmmc1.c
rename to arch/arm/plat-samsung/dev-hsmmc1.c
arch/arm/plat-samsung/dev-hsmmc2.c renamed from arch/arm/plat-s3c/dev-hsmmc2.c +0 -0
similarity index 100%
rename from arch/arm/plat-s3c/dev-hsmmc2.c
rename to arch/arm/plat-samsung/dev-hsmmc2.c
arch/arm/plat-samsung/dev-i2c0.c renamed from arch/arm/plat-s3c/dev-i2c0.c +0 -0
similarity index 100%
rename from arch/arm/plat-s3c/dev-i2c0.c
rename to arch/arm/plat-samsung/dev-i2c0.c
arch/arm/plat-samsung/dev-i2c1.c renamed from arch/arm/plat-s3c/dev-i2c1.c +0 -0
similarity index 100%
rename from arch/arm/plat-s3c/dev-i2c1.c
rename to arch/arm/plat-samsung/dev-i2c1.c
arch/arm/plat-samsung/dev-nand.c renamed from arch/arm/plat-s3c/dev-nand.c +0 -0
similarity index 100%
rename from arch/arm/plat-s3c/dev-nand.c
rename to arch/arm/plat-samsung/dev-nand.c
arch/arm/plat-samsung/dev-usb-hsotg.c renamed from arch/arm/plat-s3c/dev-usb-hsotg.c +0 -0
similarity index 100%
rename from arch/arm/plat-s3c/dev-usb-hsotg.c
rename to arch/arm/plat-samsung/dev-usb-hsotg.c
arch/arm/plat-samsung/dev-usb.c renamed from arch/arm/plat-s3c/dev-usb.c +0 -0
similarity index 100%
rename from arch/arm/plat-s3c/dev-usb.c
rename to arch/arm/plat-samsung/dev-usb.c
Signature · 1 line
1.6.0.4
author
#3 lore raw

PATCH 1/1 ARM: SAMSUNG: Move gpio-config.c into plat-samsung

In reply to Ben Dooks

The arch/arm/plat-s3c/gpio-config.c file is common to pretty much all the Samsung SoCs, so move it to arch/arm/plat-samsung

---
 arch/arm/plat-s3c/Kconfig                         |   33 -------------------
 arch/arm/plat-s3c/Makefile                        |    1 -
 arch/arm/plat-samsung/Kconfig                     |   35 +++++++++++++++++++++
 arch/arm/plat-samsung/Makefile                    |    1 +
 arch/arm/{plat-s3c => plat-samsung}/gpio-config.c |    0
 5 files changed, 36 insertions(+), 34 deletions(-)
 rename arch/arm/{plat-s3c => plat-samsung}/gpio-config.c (100%)
arch/arm/plat-s3c/Kconfig +0 -33
index cd979b1..454cc39 100644
@@ -130,39 +130,6 @@ config S3C_GPIO_TRACK
 	  Internal configuration option to enable the s3c specific gpio
 	  chip tracking if the platform requires it.
 
-config S3C_GPIO_PULL_UPDOWN
-	bool
-	help
-	  Internal configuration to enable the correct GPIO pull helper
-
-config S3C_GPIO_PULL_DOWN
-	bool
-	help
-	  Internal configuration to enable the correct GPIO pull helper
-
-config S3C_GPIO_PULL_UP
-	bool
-	help
-	  Internal configuration to enable the correct GPIO pull helper
-
-config S3C_GPIO_CFG_S3C24XX
-	bool
-	help
-	  Internal configuration to enable S3C24XX style GPIO configuration
-	  functions.
-
-config S3C_GPIO_CFG_S3C64XX
-	bool
-	help
-	  Internal configuration to enable S3C64XX style GPIO configuration
-	  functions.
-
-config S5P_GPIO_CFG_S5PC1XX
-	bool
-	help
-	  Internal configuration to enable S5PC1XX style GPIO configuration
-	  functions.
-
 # DMA
 
 config S3C_DMA
arch/arm/plat-s3c/Makefile +0 -1
index d862995..ea4a001 100644
@@ -14,7 +14,6 @@ obj-				:=
 obj-y				+= init.o
 obj-y				+= time.o
 obj-y				+= gpio.o
-obj-y				+= gpio-config.o
 
 # DMA support
 
arch/arm/plat-samsung/Kconfig +35 -0
index 5a72a52..9e7daf2 100644
@@ -19,6 +19,41 @@ config SAMSUNG_CLKSRC
 	  Select the clock code for the clksrc implementation
 	  used by newer systems such as the S3C64XX.
 
+# options for gpio configuration support
+
+config S3C_GPIO_CFG_S3C24XX
+	bool
+	help
+	  Internal configuration to enable S3C24XX style GPIO configuration
+	  functions.
+
+config S3C_GPIO_CFG_S3C64XX
+	bool
+	help
+	  Internal configuration to enable S3C64XX style GPIO configuration
+	  functions.
+
+config S5P_GPIO_CFG_S5PC1XX
+	bool
+	help
+	  Internal configuration to enable S5PC1XX style GPIO configuration
+	  functions.
+
+config S3C_GPIO_PULL_UPDOWN
+	bool
+	help
+	  Internal configuration to enable the correct GPIO pull helper
+
+config S3C_GPIO_PULL_DOWN
+	bool
+	help
+	  Internal configuration to enable the correct GPIO pull helper
+
+config S3C_GPIO_PULL_UP
+	bool
+	help
+	  Internal configuration to enable the correct GPIO pull helper
+
 # device definitions to compile in
 
 config S3C_DEV_HSMMC
arch/arm/plat-samsung/Makefile +1 -0
index 32f03e5..2c01437 100644
@@ -13,6 +13,7 @@ obj-				:=
 
 obj-y				+= clock.o
 obj-y				+= pwm-clock.o
+obj-y				+= gpio-config.o
 
 obj-$(CONFIG_SAMSUNG_CLKSRC)	+= clock-clksrc.o
 
arch/arm/plat-samsung/gpio-config.c renamed from arch/arm/plat-s3c/gpio-config.c +0 -0
similarity index 100%
rename from arch/arm/plat-s3c/gpio-config.c
rename to arch/arm/plat-samsung/gpio-config.c
Signature · 1 line
1.6.0.4
author
#4 lore raw

PATCH 1/1 ARM: SAMSUNG: Move IRQ VIC timer handling out to common header files

In reply to Ben Dooks

Move the VIC based timer interrupt handling out of plat-s3c64xx and into plat-samsung to be re-used for other systems. This also reduces the code size as we now have a common init routine and use the irq_desc to store the interrupt number of the timer.

---
 arch/arm/plat-s3c64xx/Kconfig                      |    1 +
 arch/arm/plat-s3c64xx/irq.c                        |   90 ++------------------
 arch/arm/plat-samsung/Kconfig                      |    7 ++
 arch/arm/plat-samsung/Makefile                     |    2 +
 arch/arm/plat-samsung/include/plat/irq-vic-timer.h |   13 +++
 arch/arm/plat-samsung/irq-vic-timer.c              |   86 +++++++++++++++++++
 6 files changed, 116 insertions(+), 83 deletions(-)
 create mode 100644 arch/arm/plat-samsung/include/plat/irq-vic-timer.h
 create mode 100644 arch/arm/plat-samsung/irq-vic-timer.c
arch/arm/plat-s3c64xx/Kconfig +1 -0
index bec1224..02d716f 100644
@@ -14,6 +14,7 @@ config PLAT_S3C64XX
 	select NO_IOPORT
 	select ARCH_REQUIRE_GPIOLIB
 	select SAMSUNG_CLKSRC
+	select SAMSUNG_IRQ_VIC_TIMER
 	select S3C_GPIO_TRACK
 	select S3C_GPIO_PULL_UPDOWN
 	select S3C_GPIO_CFG_S3C24XX
arch/arm/plat-s3c64xx/irq.c +7 -83

112 lines not on this page · raw message

arch/arm/plat-samsung/Kconfig +7 -0
index 9e7daf2..cedecd8 100644
@@ -19,6 +19,13 @@ config SAMSUNG_CLKSRC
 	  Select the clock code for the clksrc implementation
 	  used by newer systems such as the S3C64XX.
 
+# options for IRQ support
+
+config SAMSUNG_IRQ_VIC_TIMER
+       bool
+       help
+         Internal configuration to build the VIC timer interrupt code.
+
 # options for gpio configuration support
 
 config S3C_GPIO_CFG_S3C24XX
arch/arm/plat-samsung/Makefile +2 -0
index 2c01437..aa048c7 100644
@@ -17,6 +17,8 @@ obj-y				+= gpio-config.o
 
 obj-$(CONFIG_SAMSUNG_CLKSRC)	+= clock-clksrc.o
 
+obj-$(CONFIG_SAMSUNG_IRQ_VIC_TIMER) += irq-vic-timer.o
+
 # devices
 
 obj-$(CONFIG_S3C_DEV_HSMMC)	+= dev-hsmmc.o
arch/arm/plat-samsung/include/plat/irq-vic-timer.h new file +13 -0
new file mode 100644
index 0000000..a90b534
@@ -0,0 +1,13 @@
+/* arch/arm/plat-samsung/include/plat/irq-vic-timer.h
+ *
+ * Copyright (c) 2010 Simtec Electronics
+ *	Ben Dooks <[email protected]>
+ *
+ * Header file for Samsung SoC IRQ VIC timer
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+extern void s3c_init_vic_timer_irq(unsigned int vic, unsigned int timer);
arch/arm/plat-samsung/irq-vic-timer.c new file +86 -0

86 lines not on this page · raw message

Signature · 1 line
1.6.0.4
author
#5 lore raw

PATCH 1/1 ARM: SAMSUNG: Move IRQ UART handling for newer devices to plat-samsung

In reply to Ben Dooks

Move the handling for the UART interrupts out of the s3c64xx specific code and into plat-samsung so that it can be used by all implementations that need it.

---
 arch/arm/plat-s3c64xx/Kconfig                 |    1 +
 arch/arm/plat-s3c64xx/irq.c                   |  117 +--------------------
 arch/arm/plat-samsung/Kconfig                 |    5 +
 arch/arm/plat-samsung/Makefile                |    1 +
 arch/arm/plat-samsung/include/plat/irq-uart.h |   20 ++++
 arch/arm/plat-samsung/irq-uart.c              |  143 +++++++++++++++++++++++++
 6 files changed, 173 insertions(+), 114 deletions(-)
 create mode 100644 arch/arm/plat-samsung/include/plat/irq-uart.h
 create mode 100644 arch/arm/plat-samsung/irq-uart.c
arch/arm/plat-s3c64xx/Kconfig +1 -0
index 02d716f..0fba1f9 100644
@@ -15,6 +15,7 @@ config PLAT_S3C64XX
 	select ARCH_REQUIRE_GPIOLIB
 	select SAMSUNG_CLKSRC
 	select SAMSUNG_IRQ_VIC_TIMER
+	select SAMSUNG_IRQ_UART
 	select S3C_GPIO_TRACK
 	select S3C_GPIO_PULL_UPDOWN
 	select S3C_GPIO_CFG_S3C24XX
arch/arm/plat-s3c64xx/irq.c +3 -114

138 lines not on this page · raw message

arch/arm/plat-samsung/Kconfig +5 -0
index cedecd8..900b463 100644
@@ -26,6 +26,11 @@ config SAMSUNG_IRQ_VIC_TIMER
        help
          Internal configuration to build the VIC timer interrupt code.
 
+config SAMSUNG_IRQ_UART
+       bool
+       help
+         Internal configuration to build the IRQ UART demux code.
+
 # options for gpio configuration support
 
 config S3C_GPIO_CFG_S3C24XX
arch/arm/plat-samsung/Makefile +1 -0
index aa048c7..aeb7e12 100644
@@ -17,6 +17,7 @@ obj-y				+= gpio-config.o
 
 obj-$(CONFIG_SAMSUNG_CLKSRC)	+= clock-clksrc.o
 
+obj-$(CONFIG_SAMSUNG_IRQ_UART)	+= irq-uart.o
 obj-$(CONFIG_SAMSUNG_IRQ_VIC_TIMER) += irq-vic-timer.o
 
 # devices
arch/arm/plat-samsung/include/plat/irq-uart.h new file +20 -0
new file mode 100644
index 0000000..a9331e4
@@ -0,0 +1,20 @@
+/* arch/arm/plat-samsung/include/plat/irq-uart.h
+ *
+ * Copyright (c) 2010 Simtec Electronics
+ *	Ben Dooks <[email protected]>
+ *
+ * Header file for Samsung SoC UART IRQ demux for S3C64XX and later
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+struct s3c_uart_irq {
+	void __iomem	*regs;
+	unsigned int	 base_irq;
+	unsigned int	 parent_irq;
+};
+
+extern void s3c_init_uart_irqs(struct s3c_uart_irq *irq, unsigned int nr_irqs);
+
arch/arm/plat-samsung/irq-uart.c new file +143 -0

143 lines not on this page · raw message

Signature · 1 line
1.6.0.4
author
#6 lore raw

PATCH 1/1 ARM: Add common entry code for system with two VICs

In reply to Ben Dooks

Add a common entry-macro-vic2.S for systems where there are two VICs so that the machine or platform directories just need to setup the correct information before including <asm/entry-macro-vic2.S> into their own entry-macro.S file.

Since this code is from the S3C64XX project, we update the S3C64XX machine entry code to use this new header.

---
 arch/arm/include/asm/entry-macro-vic2.S          |   57 ++++++++++++++++++++++
 arch/arm/mach-s3c6400/include/mach/entry-macro.S |   28 +----------
 arch/arm/mach-s3c6400/include/mach/map.h         |    4 +-
 arch/arm/mach-s3c6400/include/mach/tick.h        |    2 +-
 arch/arm/plat-s3c64xx/cpu.c                      |    4 +-
 arch/arm/plat-s3c64xx/include/plat/irqs.h        |    8 ++--
 arch/arm/plat-s3c64xx/irq.c                      |    4 +-
 7 files changed, 69 insertions(+), 38 deletions(-)
 create mode 100644 arch/arm/include/asm/entry-macro-vic2.S
arch/arm/include/asm/entry-macro-vic2.S new file +57 -0
new file mode 100644
index 0000000..3ceb85e
@@ -0,0 +1,57 @@
+/* arch/arm/include/asm/entry-macro-vic2.S
+ *
+ * Originally arch/arm/mach-s3c6400/include/mach/entry-macro.S
+ *
+ * Copyright 2008 Openmoko, Inc.
+ * Copyright 2008 Simtec Electronics
+ *	http://armlinux.simtec.co.uk/
+ *	Ben Dooks <[email protected]>
+ *
+ * Low-level IRQ helper macros for a device with two VICs
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+*/
+
+/* This should be included from <mach/entry-macro.S> with the necessary
+ * defines for virtual addresses and IRQ bases for the two vics.
+ *
+ * The code needs the following defined:
+ *	IRQ_VIC0_BASE	IRQ number of VIC0's first IRQ
+ *	IRQ_VIC1_BASE	IRQ number of VIC1's first IRQ
+ *	VA_VIC0		Virtual address of VIC0
+ *	VA_VIC1		Virtual address of VIC1
+ *
+ * Note, code assumes VIC0's virtual address is an ARM immediate constant
+ * away from VIC1.
+*/
+
+#include <asm/hardware/vic.h>
+
+	.macro	disable_fiq
+	.endm
+
+	.macro	get_irqnr_preamble, base, tmp
+	ldr	\base, =VA_VIC0
+	.endm
+
+	.macro	arch_ret_to_user, tmp1, tmp2
+	.endm
+
+	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
+
+	@ check the vic0
+	mov	\irqnr, #IRQ_VIC0_BASE + 31
+	ldr	\irqstat, [ \base, # VIC_IRQ_STATUS ]
+	teq	\irqstat, #0
+
+	@ otherwise try vic1
+	addeq	\tmp, \base, #(VA_VIC1 - VA_VIC0)
+	addeq	\irqnr, \irqnr, #(IRQ_VIC1_BASE - IRQ_VIC0_BASE)
+	ldreq	\irqstat, [ \tmp, # VIC_IRQ_STATUS ]
+	teqeq	\irqstat, #0
+
+	clzne	\irqstat, \irqstat
+	subne	\irqnr, \irqnr, \irqstat
+	.endm
arch/arm/mach-s3c6400/include/mach/entry-macro.S +1 -27
index fbd90d2..33a8fe2 100644
@@ -12,33 +12,7 @@
  * warranty of any kind, whether express or implied.
 */
 
-#include <asm/hardware/vic.h>
 #include <mach/map.h>
 #include <plat/irqs.h>
 
-	.macro	disable_fiq
-	.endm
-
-	.macro	get_irqnr_preamble, base, tmp
-	ldr	\base, =S3C_VA_VIC0
-	.endm
-
-	.macro	arch_ret_to_user, tmp1, tmp2
-	.endm
-
-	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-
-	@ check the vic0
-	mov	\irqnr, # S3C_IRQ_OFFSET + 31
-	ldr	\irqstat, [ \base, # VIC_IRQ_STATUS ]
-	teq	\irqstat, #0
-
-	@ otherwise try vic1
-	addeq	\tmp, \base, #(S3C_VA_VIC1 - S3C_VA_VIC0)
-	addeq	\irqnr, \irqnr, #32
-	ldreq	\irqstat, [ \tmp, # VIC_IRQ_STATUS ]
-	teqeq	\irqstat, #0
-
-	clzne	\irqstat, \irqstat
-	subne	\irqnr, \irqnr, \irqstat
-	.endm
+#include <asm/entry-macro-vic2.S>
arch/arm/mach-s3c6400/include/mach/map.h +2 -2
index 106ee13..d4cd3ab 100644
@@ -70,8 +70,8 @@
 #define S3C64XX_VA_USB_HSPHY	S3C_ADDR_CPU(0x00200000)
 
 /* place VICs close together */
-#define S3C_VA_VIC0		(S3C_VA_IRQ + 0x00)
-#define S3C_VA_VIC1		(S3C_VA_IRQ + 0x10000)
+#define VA_VIC0			(S3C_VA_IRQ + 0x00)
+#define VA_VIC1			(S3C_VA_IRQ + 0x10000)
 
 /* compatibiltiy defines. */
 #define S3C_PA_TIMER		S3C64XX_PA_TIMER
arch/arm/mach-s3c6400/include/mach/tick.h +1 -1
index d9c0dc7..ebe18a9 100644
@@ -20,7 +20,7 @@
  */
 static inline u32 s3c24xx_ostimer_pending(void)
 {
-	u32 pend = __raw_readl(S3C_VA_VIC0 + VIC_RAW_STATUS);
+	u32 pend = __raw_readl(VA_VIC0 + VIC_RAW_STATUS);
 	return pend & 1 << (IRQ_TIMER4_VIC - S3C64XX_IRQ_VIC0(0));
 }
 
arch/arm/plat-s3c64xx/cpu.c +2 -2
index 49796d2..c0e6f2a 100644
@@ -78,12 +78,12 @@ static struct map_desc s3c_iodesc[] __initdata = {
 		.length		= SZ_4K,
 		.type		= MT_DEVICE,
 	}, {
-		.virtual	= (unsigned long)S3C_VA_VIC0,
+		.virtual	= (unsigned long)VA_VIC0,
 		.pfn		= __phys_to_pfn(S3C64XX_PA_VIC0),
 		.length		= SZ_16K,
 		.type		= MT_DEVICE,
 	}, {
-		.virtual	= (unsigned long)S3C_VA_VIC1,
+		.virtual	= (unsigned long)VA_VIC1,
 		.pfn		= __phys_to_pfn(S3C64XX_PA_VIC1),
 		.length		= SZ_16K,
 		.type		= MT_DEVICE,
arch/arm/plat-s3c64xx/include/plat/irqs.h +4 -4
index 7956fd3..176fe15 100644
@@ -24,8 +24,8 @@
 
 #define S3C_IRQ(x)	((x) + S3C_IRQ_OFFSET)
 
-#define S3C_VIC0_BASE	S3C_IRQ(0)
-#define S3C_VIC1_BASE	S3C_IRQ(32)
+#define IRQ_VIC0_BASE	S3C_IRQ(0)
+#define IRQ_VIC1_BASE	S3C_IRQ(32)
 
 /* UART interrupts, each UART has 4 intterupts per channel so
  * use the space between the ISA and S3C main interrupts. Note, these
@@ -59,8 +59,8 @@
 
 /* VIC based IRQs */
 
-#define S3C64XX_IRQ_VIC0(x)	(S3C_VIC0_BASE + (x))
-#define S3C64XX_IRQ_VIC1(x)	(S3C_VIC1_BASE + (x))
+#define S3C64XX_IRQ_VIC0(x)	(IRQ_VIC0_BASE + (x))
+#define S3C64XX_IRQ_VIC1(x)	(IRQ_VIC1_BASE + (x))
 
 /* VIC0 */
 
arch/arm/plat-s3c64xx/irq.c +2 -2
index b98451e..67a145d 100644
@@ -54,8 +54,8 @@ void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)
 	printk(KERN_DEBUG "%s: initialising interrupts\n", __func__);
 
 	/* initialise the pair of VICs */
-	vic_init(S3C_VA_VIC0, S3C_VIC0_BASE, vic0_valid, 0);
-	vic_init(S3C_VA_VIC1, S3C_VIC1_BASE, vic1_valid, 0);
+	vic_init(VA_VIC0, IRQ_VIC0_BASE, vic0_valid, 0);
+	vic_init(VA_VIC1, IRQ_VIC1_BASE, vic1_valid, 0);
 
 	/* add the timer sub-irqs */
 
Signature · 1 line
1.6.0.4