Commit Graph

12 Commits

Author SHA1 Message Date
Hans de Goede b6006baf9c sunxi: Move all boards to the driver-model
Now that we've everything prepared for it remove the DM settings from the
defconfig(s) and simply always set them for sunxi.

This makes all sunxi boards allways use the driver model for gpios and
ethernet, and allows us to move over more bits to the driver-model without
the need to introduce #ifdef-ery for boards which are not yet using DM.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-04 16:51:54 +02:00
Hans de Goede 25acd33f85 sunxi: dts: Add a CONFIG_DEFAULT_DEVICE_TREE setting to all sunxi boards
This is a preparation patch for switching all sunxi boards over to using
the driver model.

Note that rather then defining both CONFIG_DEFAULT_DEVICE_TREE (for u-boot)
and CONFIG_FDTFILE (for the kernel), this commit simply replaces all
CONFIG_FDTFILE defconfig settings with CONFIG_DEFAULT_DEVICE_TREE and
uses CONFIG_DEFAULT_DEVICE_TREE for setting the default fdtfile env value
in sunxi-common.h .

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-05-04 16:51:54 +02:00
Simon Glass ef48f6dd30 Kconfig: Move CONFIG_DESIGNWARE_ETH to Kconfig
Move this to Kconfig and clean up board config files that use it. Also
rename it to CONFIG_ETH_DESIGNWARE to fit with the naming that exists
in drivers/net/Kconfig.

Signed-off-by: Simon Glass <sjg@chromium.org>
Version 1:
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-04-18 11:11:36 -06:00
Paul Kocialkowski 9816d52d8e sunxi: A20-OLinuXino-Lime2 USB0 VBUS detect and enable pins
This allows enabling MUSB (on the OTG port).

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-04-15 16:17:18 +02:00
Paul Kocialkowski b25152828f sunxi: A20-OLinuXino-Lime2 mmc0 card-detect pin
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-04-15 16:17:18 +02:00
Masahiro Yamada 252ed8729d kconfig: remove meaningless prefixes in defconfig files
Since commit e02ee2548a (kconfig: switch to single .config
configuration), the prefixes in defconfig files such as "+S:",
"+ST:", etc., are meaningless.

This commit was generated by the following command:

  find configs -name '*_defconfig' | xargs sed -i 's/^+*S*T*://'

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-03-15 14:31:06 -04:00
Hans de Goede 40d0cdda3e sunxi: Remove CONFIG_TARGET_FOO for sun5i and sun7i boards
CONFIG_TARGET_FOO was only used in board/sunxi/Makefile to select the
dram config for sun5i and sun7i boards and in board/sunxi/gmac.c for some
special handling of the bananapi/bananapro (both sun7i), all sun5i and sun7i
boards have been moved over to using a single dram_sun5i_autoconfig file,
and the tx clk delay handling for the Banana boards now has its own Kconfig.

IOW nothing is using CONFIG_TARGET_FOO anymore, so remove it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-02-02 13:55:14 +01:00
Hans de Goede 389046be2f sunxi: Convert sun7i boards to use auto dram configuration
Currently we've separate detailed dram settings for all sun7i boards, this
moves them over to using auto dram configuration so that we can get rid of
all the per board dram_foo.c files.

This has been tested on a A20-Olinuxino-Lime, A20-Olinuxino_MICRO, Bananapi,
Bananapro, Cubieboard2, Cubietruck, Mele_M3 and a Linksprite_pcDuino3.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
2015-01-23 15:15:02 +01:00
Ian Campbell d9a2047641 sunxi: kconfig: Introduce CONFIG_TARGET_<BOARD>
This was done automatically with the following bits of scripting.

The Kconfig choice content was generated with this script snippet:
    for i in $(git grep -l CONFIG_ARCH_SUNXI configs/*) ; do
        TARGET=$(sed -n -e 's/CONFIG_SYS_EXTRA_OPTIONS="\([^,"]\+\).*/\1/p' $i);
        MACH=$(sed -n -e 's/.*CONFIG_\(MACH_SUN.I\)=./\1/p' $i)
        echo "config TARGET_$TARGET"
        echo "	bool \"$TARGET\""
        echo "	depends on $MACH"
        echo
    done

defconfigs were updated with a sed script (t):
    # Extract board from first entry of CONFIG_SYS_EXTRA_OPTIONS,
    /^CONFIG_SYS_EXTRA_OPTIONS/ {
        s/^\(CONFIG_SYS_EXTRA_OPTIONS="\)\([^,"]\+\),\?\(.*\)/\1\3\nCONFIG_TARGET_\2=y/;

        # Print and delete first line (CONFIG_SYS_EXTRA_OPTIONS), leaving
        # CONFIG_TARGET_<BOARD> in pattern space
        P;D;
    };

    # Move CONFIG_TARGET_<BOARD> to hold space
    /^CONFIG_TARGET/{h;n}

    # Print CONFIG_TARGET_<BOARD> after CONFIG_MACH_<SOC> in either SPL or
    # normal mode.
    /^CONFIG_MACH/{p;g;p;n};
    /^\+S:CONFIG_MACH/{p;g;s/^CONFIG_TARGET/+S:&/;p;n};

    # Print any remaining lines normally
    p;
Run as:
    sed -i -n -f t $(git grep -l CONFIG_ARCH_SUNXI configs/*)
and then manually removing the one instance of CONFIG_SYS_EXTRA_OPTIONS="" from
Colombus_defconfig

board/sunxi/Makefile was updated with:
    sed -e 's/^\(obj-\$(CONFIG_\)\(.*\)\().*+= dram_.*\)/\1TARGET_\2\3/g' board/sunxi/Makefile
and manually retabbing a few lines to line up again.

The board descriptions could certainly be improved.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-11-05 13:09:58 +01:00
Ian Campbell c3be279322 sunxi: kconfig: Rename TARGET_SUN[45678]I to MACH_SUN[45678]I.
Now we have CONFIG_ARCH_SUNXI as the toplevel, CONFIG_MACH_SUN[45678]I as the
per-SoC option and leave CONFIG_TARGET_BLAH free for individual boards in the
future.

Done automatically with:
    sed -i -e 's/TARGET_\(SUN[45678]I\)/MACH_\1/g' $(git grep -l TARGET_SUN[45678]I)

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-11-05 13:09:57 +01:00
Ian Campbell 2c7e3b9046 sunxi: kconfig: Add top-level ARCH_SUNXI
And make TARGET_SUN[45678]I a choice variable under this.

configs updated with:
    sed -i -e 's/^\(\+S:\)\?CONFIG_TARGET_SUN.I=y/\1CONFIG_ARCH_SUNXI=y\n&/g' configs/*

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-11-05 13:09:57 +01:00
Iain Paton d71910fc50 sun7i: Add support for Olimex A20-OLinuXino-LIME2
This adds support for the Olimex A20-OLinuXino-Lime2
https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXIno-LIME2

Differences to previous Lime boards are 1GB RAM and gigabit ethernet

Signed-off-by: Iain Paton <ipaton0@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-10-24 09:35:37 +02:00