[PATCH 2/4] Fine split S3C arch dependencies from generic code

Juergen Beisert jbe at pengutronix.de
Thu May 3 13:41:00 EDT 2012


Alexey Galakhov wrote:
> diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> index 5c6d8b3..3e211d5 100644
> --- a/drivers/mtd/nand/Makefile
> +++ b/drivers/mtd/nand/Makefile
> @@ -14,4 +14,4 @@ obj-$(CONFIG_MTD_NAND_NOMADIK)                += nomadik_nand.o
>  obj-$(CONFIG_NAND_IMX)		+= nand_imx.o 
>  obj-$(CONFIG_NAND_OMAP_GPMC)         += nand_omap_gpmc.o nand_omap_bch_decoder.o
>  obj-$(CONFIG_NAND_ATMEL)             += atmel_nand.o
> -obj-$(CONFIG_NAND_S3C24XX)           += nand_s3c24xx.o
> +obj-$(CONFIG_NAND_S3C)               += nand_s3c.o

> delete mode 100644 drivers/mtd/nand/nand_s3c24xx.c
> create mode 100644 drivers/mtd/nand/nand_s3c.c

> create mode 100644 arch/arm/mach-samsung/include/mach/s3c-nand.h
> delete mode 100644 arch/arm/mach-samsung/include/mach/s3c24xx-nand.h

That is a really bad idea. I just renamed these files at January 2012 to reflect
their CPU (refer b29b8f43d56b62e406349a5cf1ed56f17454c1f7). Why do you revert
this change again? The NAND controller in the S3C24XX CPU is unique to this
CPU. The NAND controller in the S3C6410 differs from it, and I guess the same
is true in the S5 CPU. So, the newer CPUs need their own NAND drivers.

What is the sense of renaming these files?

> create mode 100644 arch/arm/mach-samsung/clocks-s3c24x0.c
> delete mode 100644 arch/arm/mach-samsung/s3c24xx-clocks.c

> create mode 100644 arch/arm/mach-samsung/include/mach/gpio-s3c24x0.h
> delete mode 100644 arch/arm/mach-samsung/include/mach/s3c24xx-gpio.h

This rename _could_ make sense:

> delete mode 100644 arch/arm/mach-samsung/lowlevel-init.S
> create mode 100644 arch/arm/mach-samsung/lowlevel-s3c24x0.S

But on the other hand, this lowlevel init is only required on the S3C24xx
CPUs, as all newer CPUs are coming with an internal ROM (called iROM) and
booting completely different. So, for these CPUs there is no need for such
lowlevel functions.

So sorry, this patch doesn't do a "Fine split".

My b29b8f43d56b62e406349a5cf1ed56f17454c1f7 already separated the S3C24xx
from other Samsung implementations. I think there is no need to touch all
the S3C24xx related files again when adding a new Samsung CPU.

Juergen

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |



More information about the barebox mailing list