RE: S5PC1XX clocki fixes

2010-01-12 Thread Marek Szyprowski
Hello,

On Tuesday, January 12, 2010 5:20 AM Ben Dooks wrote:

 Initial set of S5PC1XX clock fixes, two temporary patches in this series
 to allow it to build which will go away once the parent patches are fixed.
 
 Currently only build tested.
 
Thanks for your patches! I was about to send similar patches for S5PC100 today,
but had some issues left to resolve. I've tested your patches and there is some
regression. Kernel fails to boot trying to dereference NULL pointer. I will
sort this out asap.

I will also update S5PC110 patches to use as much as possible from new common
plat-samsung framework.

Best regards
--
Marek Szyprowski
Samsung Poland RD Center

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: S5PC1XX: Move to using standard timer IRQ handling code

2010-01-12 Thread Marek Szyprowski
Hello,

On Tuesday, January 12, 2010 6:21 AM Ben Dooks wrote:

 Move to using the standard VIC/Timer IRQ handling code added previously\
 to avoid duplicating code.
 
 Signed-off-by: Ben Dooks ben-li...@fluff.org
 ---
  arch/arm/mach-s5pc100/include/mach/tick.h |2 +-
  arch/arm/plat-s5pc1xx/Kconfig |2 +
  arch/arm/plat-s5pc1xx/include/plat/irqs.h |   19 --
  arch/arm/plat-s5pc1xx/irq.c   |   88 ++--
  4 files changed, 23 insertions(+), 88 deletions(-)
 
 diff --git a/arch/arm/mach-s5pc100/include/mach/tick.h 
 b/arch/arm/mach-s5pc100/include/mach/tick.h
 index d3de0f3..f338c9e 100644
 --- a/arch/arm/mach-s5pc100/include/mach/tick.h
 +++ b/arch/arm/mach-s5pc100/include/mach/tick.h
 @@ -21,7 +21,7 @@
  static inline u32 s3c24xx_ostimer_pending(void)
  {
   u32 pend = __raw_readl(S3C_VA_VIC0 + VIC_RAW_STATUS);
 - return pend  1  (IRQ_TIMER4 - S5PC1XX_IRQ_VIC0(0));
 + return pend  1  (IRQ_TIMER4_VIC - S5PC1XX_IRQ_VIC0(0));
  }
 
  #define TICK_MAX (0x)
 diff --git a/arch/arm/plat-s5pc1xx/Kconfig b/arch/arm/plat-s5pc1xx/Kconfig
 index 5d97b1c..6438bcd 100644
 --- a/arch/arm/plat-s5pc1xx/Kconfig
 +++ b/arch/arm/plat-s5pc1xx/Kconfig
 @@ -12,11 +12,13 @@ config PLAT_S5PC1XX
   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
   select S3C_GPIO_CFG_S3C64XX
   select S5P_GPIO_CFG_S5PC1XX
 + select SAMSUNG_IRQ_VIC_TIMER
   help
 Base platform code for any Samsung S5PC1XX device

Double entry (probably a consequence of automatic merge or so).

 ...

Best regards
--
Marek Szyprowski
Samsung Poland RD Center

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: S5PC1XX: Remove definitions deleted by previous clksrc changes

2010-01-12 Thread Marek Szyprowski
Hello,

On Tuesday, January 12, 2010 5:20 AM Ben Dooks wrote:

 From: Ben Dooks ben-li...@fluff.org
 
 Remove the definitions we've deleted in the previous updates to the
 clksrc_clk for arch/arm/plat-s5pc1xx/include/plat/regs-clock.h.
 
 Signed-off-by: Ben Dooks ben-li...@fluff.org
 ---
  arch/arm/plat-s5pc1xx/include/plat/regs-clock.h |   60 
 ---
  1 files changed, 0 insertions(+), 60 deletions(-)
 
 diff --git a/arch/arm/plat-s5pc1xx/include/plat/regs-clock.h b/arch/arm/plat-
 s5pc1xx/include/plat/regs-clock.h
 index c5cc86e..e88562e 100644
 --- a/arch/arm/plat-s5pc1xx/include/plat/regs-clock.h
 +++ b/arch/arm/plat-s5pc1xx/include/plat/regs-clock.h
 @@ -62,53 +62,16 @@
  #define S5PC100_EPLLVAL(_m, _p, _s)  ((_m)  16 | ((_p)  8) | ((_s)))
 
  /* CLKSRC0 */
 -#define S5PC100_CLKSRC0_APLL_MASK(0x10)
 -#define S5PC100_CLKSRC0_APLL_SHIFT   (0)
 -#define S5PC100_CLKSRC0_MPLL_MASK(0x14)
 -#define S5PC100_CLKSRC0_MPLL_SHIFT   (4)
 -#define S5PC100_CLKSRC0_EPLL_MASK(0x18)
 -#define S5PC100_CLKSRC0_EPLL_SHIFT   (8)
 -#define S5PC100_CLKSRC0_HPLL_MASK(0x112)
 -#define S5PC100_CLKSRC0_HPLL_SHIFT   (12)
 -#define S5PC100_CLKSRC0_AMMUX_MASK   (0x116)
 -#define S5PC100_CLKSRC0_AMMUX_SHIFT  (16)
  #define S5PC100_CLKSRC0_HREF_MASK(0x120)
  #define S5PC100_CLKSRC0_HREF_SHIFT   (20)
 -#define S5PC100_CLKSRC0_ONENAND_MASK (0x124)
 -#define S5PC100_CLKSRC0_ONENAND_SHIFT(24)
 ...
  /* CLKDIV2 */
  #define S5PC100_CLKDIV2_UART_MASK(0x70)
 -#define S5PC100_CLKDIV2_UART_SHIFT   (0)
  #define S5PC100_CLKDIV2_SPI0_MASK(0xf4)
 -#define S5PC100_CLKDIV2_SPI0_SHIFT   (4)
  #define S5PC100_CLKDIV2_SPI1_MASK(0xf8)
 -#define S5PC100_CLKDIV2_SPI1_SHIFT   (8)
  #define S5PC100_CLKDIV2_SPI2_MASK(0xf12)
 -#define S5PC100_CLKDIV2_SPI2_SHIFT   (12)
  #define S5PC100_CLKDIV2_IRDA_MASK(0xf16)
  #define S5PC100_CLKDIV2_IRDA_SHIFT   (16)
  #define S5PC100_CLKDIV2_UHOST_MASK   (0xf20)
 -#define S5PC100_CLKDIV2_UHOST_SHIFT  (20)

 ...

IMHO it is not a good idea to remove these defines selectively. Header
would look strange and one might conclude that something is missing.

Removing all of them is also a bad idea, because some important
information is lost in such case (it would be harder to add missing
clocks to the system). Half of these defines are redundant anyway,
so maybe we should leave only *_MASK defines for informational purpose? 

Best regards
--
Marek Szyprowski
Samsung Poland RD Center

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] S3C: serial: Modify UART low-level debug port initialization procedure.

2010-01-12 Thread Thomas Abraham
The s3c24xx_serial_init_ports function is called only during low-level
debug port initialization. This function intializes all the available
uart ports when called, but it can be reduced to initializing just the
port needed for debug message output.

This patch modifies the s3c24xx_serial_init_ports to initialize only the
uart port that will be used for low-level debug output. The UART port
that is used for low-level debug output is found from the config option
S3C_LOWLEVEL_UART_PORT.

Since the functionlity of the s3c24xx_serial_init_ports function has
changed, it has been renamed as s3c24xx_serial_init_console_port by
this patch.

This patch is required on platforms that use different platform
configuration for available instances of UART module. For instance,
FIFO sizes could be different for each instance of UART. Such platforms
pass mutiple instances of platform configuration to the serial driver
instead of just one. The serial console init can then be specified as
below in the platform specific code.

s3c24xx_console_init(s5p_serial_drv, \
s5p_uart_inf[CONFIG_S3C_LOWLEVEL_UART_PORT]);

Signed-off-by: Thomas Abraham thomas...@samsung.com
---
 drivers/serial/samsung.c |   22 ++
 1 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c
index 52e3df1..dc9c51e 100644
--- a/drivers/serial/samsung.c
+++ b/drivers/serial/samsung.c
@@ -1368,26 +1368,24 @@ s3c24xx_serial_get_options(struct uart_port *port, int 
*baud,
 
 }
 
-/* s3c24xx_serial_init_ports
+/* s3c24xx_serial_init_console_port
  *
- * initialise the serial ports from the machine provided initialisation
- * data.
+ * initialise the serial port, which used as console, from the machine 
+ * provided initialisation data.
 */
 
-static int s3c24xx_serial_init_ports(struct s3c24xx_uart_info *info)
+static int s3c24xx_serial_init_console_port(struct s3c24xx_uart_info *info)
 {
struct s3c24xx_uart_port *ptr = s3c24xx_serial_ports;
struct platform_device **platdev_ptr;
-   int i;
 
-   dbg(s3c24xx_serial_init_ports: initialising ports...\n);
+   dbg(s3c24xx_serial_init_console_port: initialising ports...\n);
 
platdev_ptr = s3c24xx_uart_devs;
-
-   for (i = 0; i  CONFIG_SERIAL_SAMSUNG_UARTS; i++, ptr++, platdev_ptr++) 
{
-   s3c24xx_serial_init_port(ptr, info, *platdev_ptr);
-   }
-
+   ptr += CONFIG_S3C_LOWLEVEL_UART_PORT;
+   platdev_ptr += CONFIG_S3C_LOWLEVEL_UART_PORT;
+   
+   s3c24xx_serial_init_port(ptr, info, *platdev_ptr);
return 0;
 }
 
@@ -1469,7 +1467,7 @@ int s3c24xx_serial_initconsole(struct platform_driver 
*drv,
return 0;
 
s3c24xx_serial_console.data = s3c24xx_uart_drv;
-   s3c24xx_serial_init_ports(info);
+   s3c24xx_serial_init_console_port(info);
 
register_console(s3c24xx_serial_console);
return 0;
-- 
1.6.3.3

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] S3C: serial: Modify UART low-level debug port initialization procedure.

2010-01-12 Thread Ben Dooks
On Wed, Jan 13, 2010 at 09:10:20AM +0900, Thomas Abraham wrote:
 The s3c24xx_serial_init_ports function is called only during low-level
 debug port initialization. This function intializes all the available
 uart ports when called, but it can be reduced to initializing just the
 port needed for debug message output.
 
 This patch modifies the s3c24xx_serial_init_ports to initialize only the
 uart port that will be used for low-level debug output. The UART port
 that is used for low-level debug output is found from the config option
 S3C_LOWLEVEL_UART_PORT.

Not always, console=ttySACx could also be used to find the console.

We could change the s3c24xx_serial_initconsole() call to take a
'struct s3c24xx_uart_info **info'and change init_ports to take the
same. This does unfortunately mean that each of the s3cxxx.c serial
drivers will need to be changed.

You could change s3c24xx_console_init() to fill an array of info before
calling s3c24xx_serial_initconsole() in drivers/serial/samsung.h and
then have the s5pc110 serial code do its own console initialisation
without using the s3c24xx_console_init() macro.

If you don't want to change s3c24xx_console_init() to create an array,
then you could always change s3c24xx_serial_initconsole() to take
a third argument, so it would be:

s3c24xx_serial_initconsole(struct platform_driver *drv,
   struct s3c24xx_uart_info *info,
   struct s3c24xx_uart_info *infos)

and then change the behaviour of s3c24xx_serial_init_ports() if infos is
NULL, use the info field, otherwise take the info from infos+hwport.
 
There may of course be other options.

 Since the functionlity of the s3c24xx_serial_init_ports function has
 changed, it has been renamed as s3c24xx_serial_init_console_port by
 this patch.
 
 This patch is required on platforms that use different platform
 configuration for available instances of UART module. For instance,
 FIFO sizes could be different for each instance of UART. Such platforms
 pass mutiple instances of platform configuration to the serial driver
 instead of just one. The serial console init can then be specified as
 below in the platform specific code.
 
 s3c24xx_console_init(s5p_serial_drv, \
   s5p_uart_inf[CONFIG_S3C_LOWLEVEL_UART_PORT]);
 
 Signed-off-by: Thomas Abraham thomas...@samsung.com
 ---
  drivers/serial/samsung.c |   22 ++
  1 files changed, 10 insertions(+), 12 deletions(-)
 
 diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c
 index 52e3df1..dc9c51e 100644
 --- a/drivers/serial/samsung.c
 +++ b/drivers/serial/samsung.c
 @@ -1368,26 +1368,24 @@ s3c24xx_serial_get_options(struct uart_port *port, 
 int *baud,
  
  }
  
 -/* s3c24xx_serial_init_ports
 +/* s3c24xx_serial_init_console_port
   *
 - * initialise the serial ports from the machine provided initialisation
 - * data.
 + * initialise the serial port, which used as console, from the machine 
 + * provided initialisation data.
  */
  
 -static int s3c24xx_serial_init_ports(struct s3c24xx_uart_info *info)
 +static int s3c24xx_serial_init_console_port(struct s3c24xx_uart_info *info)
  {
   struct s3c24xx_uart_port *ptr = s3c24xx_serial_ports;
   struct platform_device **platdev_ptr;
 - int i;
  
 - dbg(s3c24xx_serial_init_ports: initialising ports...\n);
 + dbg(s3c24xx_serial_init_console_port: initialising ports...\n);
  
   platdev_ptr = s3c24xx_uart_devs;
 -
 - for (i = 0; i  CONFIG_SERIAL_SAMSUNG_UARTS; i++, ptr++, platdev_ptr++) 
 {
 - s3c24xx_serial_init_port(ptr, info, *platdev_ptr);
 - }
 -
 + ptr += CONFIG_S3C_LOWLEVEL_UART_PORT;
 + platdev_ptr += CONFIG_S3C_LOWLEVEL_UART_PORT;
 + 
 + s3c24xx_serial_init_port(ptr, info, *platdev_ptr);
   return 0;
  }
  
 @@ -1469,7 +1467,7 @@ int s3c24xx_serial_initconsole(struct platform_driver 
 *drv,
   return 0;
  
   s3c24xx_serial_console.data = s3c24xx_uart_drv;
 - s3c24xx_serial_init_ports(info);
 + s3c24xx_serial_init_console_port(info);
  
   register_console(s3c24xx_serial_console);
   return 0;
 -- 
 1.6.3.3
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-samsung-soc 
 in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
-- 
Ben

Q:  What's a light-year?
A:  One-third less calories than a regular year.

--
To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html