diff mbox

[1/4] ARM: multi_v7_defconfig: Enable common Rockchip devices/busses

Message ID 1441570566-14001-2-git-send-email-sjoerd.simons@collabora.co.uk
State Accepted
Commit 2be40ba6d7fecdff407dd2ec1d502864c37a3f8b
Headers show

Commit Message

Sjoerd Simons Sept. 6, 2015, 8:16 p.m. UTC
Enable Rockchip I2C, SPI, PWM, thermal drivers.

Builtin are:
 * I2C as it often controls the pmic.
 * Thermal, prevent thermal damage.

SPI and PWM configured as modules

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
---

 arch/arm/configs/multi_v7_defconfig | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Javier Martinez Canillas Sept. 7, 2015, 9:26 a.m. UTC | #1
Hello Sjoerd,

On 09/06/2015 10:16 PM, Sjoerd Simons wrote:
> Enable Rockchip I2C, SPI, PWM, thermal drivers.
> 
> Builtin are:
>  * I2C as it often controls the pmic.

Having I2C as a module will cause more probe deferrals due missing
regulators and slow down the boot but it should not cause issues.
Or am I missing something?

In fact, I think even the PMIC could be built as a module.

But I don't have a strong opinion on this so patch looks good:

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
Sjoerd Simons Sept. 7, 2015, 10:24 a.m. UTC | #2
On Mon, 2015-09-07 at 11:26 +0200, Javier Martinez Canillas wrote:
> Hello Sjoerd,
> 
> On 09/06/2015 10:16 PM, Sjoerd Simons wrote:
> > Enable Rockchip I2C, SPI, PWM, thermal drivers.
> > 
> > Builtin are:
> >  * I2C as it often controls the pmic.
> 
> Having I2C as a module will cause more probe deferrals due missing
> regulators and slow down the boot but it should not cause issues.
> Or am I missing something?
> 
> In fact, I think even the PMIC could be built as a module.

It could in principle. However as a lot of other drivers do need the
regulators provided by the pmic, they'll be deferred until that driver
is loaded. So e.g. with the i2c/pmic drivers as a module you cannot
boot to an NFS rootfs without using an initramfs. 

> But I don't have a strong opinion on this so patch looks good:
> 
> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 
> Best regards,
Javier Martinez Canillas Sept. 7, 2015, 10:38 a.m. UTC | #3
Hello Sjoerd,

On 09/07/2015 12:24 PM, Sjoerd Simons wrote:
> On Mon, 2015-09-07 at 11:26 +0200, Javier Martinez Canillas wrote:
>> Hello Sjoerd,
>>
>> On 09/06/2015 10:16 PM, Sjoerd Simons wrote:
>>> Enable Rockchip I2C, SPI, PWM, thermal drivers.
>>>
>>> Builtin are:
>>>  * I2C as it often controls the pmic.
>>
>> Having I2C as a module will cause more probe deferrals due missing
>> regulators and slow down the boot but it should not cause issues.
>> Or am I missing something?
>>
>> In fact, I think even the PMIC could be built as a module.
> 
> It could in principle. However as a lot of other drivers do need the
> regulators provided by the pmic, they'll be deferred until that driver
> is loaded. So e.g. with the i2c/pmic drivers as a module you cannot
> boot to an NFS rootfs without using an initramfs. 
>

Right, not needing an initramfs is certainly a good reason. If you could
add something like that in the commit message of patches 1/4 and 2/4 that
would be great.

Best regards,
Thierry Reding Sept. 7, 2015, 11:27 a.m. UTC | #4
On Mon, Sep 07, 2015 at 12:38:08PM +0200, Javier Martinez Canillas wrote:
> Hello Sjoerd,
> 
> On 09/07/2015 12:24 PM, Sjoerd Simons wrote:
> > On Mon, 2015-09-07 at 11:26 +0200, Javier Martinez Canillas wrote:
> >> Hello Sjoerd,
> >>
> >> On 09/06/2015 10:16 PM, Sjoerd Simons wrote:
> >>> Enable Rockchip I2C, SPI, PWM, thermal drivers.
> >>>
> >>> Builtin are:
> >>>  * I2C as it often controls the pmic.
> >>
> >> Having I2C as a module will cause more probe deferrals due missing
> >> regulators and slow down the boot but it should not cause issues.
> >> Or am I missing something?
> >>
> >> In fact, I think even the PMIC could be built as a module.
> > 
> > It could in principle. However as a lot of other drivers do need the
> > regulators provided by the pmic, they'll be deferred until that driver
> > is loaded. So e.g. with the i2c/pmic drivers as a module you cannot
> > boot to an NFS rootfs without using an initramfs. 
> >
> 
> Right, not needing an initramfs is certainly a good reason. If you could
> add something like that in the commit message of patches 1/4 and 2/4 that
> would be great.

I don't know. multi_v7_defconfig is primarily useful as a means to
quickly get a configuration that has most drivers enabled that most ARM
SoCs need. As such it's more of a convenience for build testing rather
than using it for booting a device.

I don't think the focus should be on optimizing for boot speed. Rather
if you do want to optimize for a device going through the trouble of
setting up an initial ramdisk isn't all that complicated. Even more so
because if you build drivers into the kernel and those drivers happen
to require firmware then people will be required to setup initial
ramdisks anyway.

Building too many drivers into the kernel has in the past often lead to
problems where all of a sudden the kernel became too big to fit into any
reasonably sized region of memory and cause all sorts of weird failures
in boot farms. Building everything as modules has the advantage that the
size of the zImage itself doesn't vary much, hence has less of a chance
to break boot farms.

There are quite a few drivers in multi_v7_defconfig that I suspect could
be built as loadable modules to decrease the size of the images that are
currently generated.

I understand that not everybody likes the additional ramdisk but, in my
opinion, that's what SoC-specific default configurations are good for.
We can use those to provide a base for developers where the focus is
ease of testability.

Thierry
diff mbox

Patch

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 36aa6e3..25a1d574 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -302,6 +302,7 @@  CONFIG_I2C_GPIO=m
 CONFIG_I2C_EXYNOS5=y
 CONFIG_I2C_MV64XXX=y
 CONFIG_I2C_RIIC=y
+CONFIG_I2C_RK3X=y
 CONFIG_I2C_S3C2410=y
 CONFIG_I2C_SH_MOBILE=y
 CONFIG_I2C_SIRF=y
@@ -318,6 +319,7 @@  CONFIG_SPI_DAVINCI=y
 CONFIG_SPI_OMAP24XX=y
 CONFIG_SPI_ORION=y
 CONFIG_SPI_PL022=y
+CONFIG_SPI_ROCKCHIP=m
 CONFIG_SPI_RSPI=y
 CONFIG_SPI_S3C64XX=m
 CONFIG_SPI_SH_MSIOF=m
@@ -365,6 +367,7 @@  CONFIG_SENSORS_LM95245=y
 CONFIG_SENSORS_NTC_THERMISTOR=m
 CONFIG_THERMAL=y
 CONFIG_CPU_THERMAL=y
+CONFIG_ROCKCHIP_THERMAL=y
 CONFIG_RCAR_THERMAL=y
 CONFIG_ARMADA_THERMAL=y
 CONFIG_DAVINCI_WATCHDOG=m
@@ -642,6 +645,7 @@  CONFIG_PWM=y
 CONFIG_PWM_ATMEL=m
 CONFIG_PWM_ATMEL_TCB=m
 CONFIG_PWM_RENESAS_TPU=y
+CONFIG_PWM_ROCKCHIP=m
 CONFIG_PWM_SAMSUNG=m
 CONFIG_PWM_SUN4I=y
 CONFIG_PWM_TEGRA=y