From fce21ae4ccfcee0c28fb18f5507e145fb0b02dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Wed, 22 Mar 2017 21:09:00 +0100 Subject: brcm2708: rename all patches from raspberrypi git tree to use 950 prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Right now all brcm2708 patches are extracted from the non-mainline raspberrypi/linux git tree. Many of them are hacks and/or are unneeded in LEDE. Raspberry Pi is getting better and better mainline support so it would be nice to finally start maintaining patches in a cleaner way: 1) Backport patches accepted in upstream tree 2) Start using upstream drivers 3) Pick only these patches that are needed for more complete support Handling above tasks requires grouping patches - ideally using the same prefixes as generic ones. It means we should rename existing patches to use some high prefix. This will allow e.g. use 0xx for backported code. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli Acked-by: Stijn Tintel --- ...050-firmware-bcm2835-Support-ARCH_BCM270x.patch | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 target/linux/brcm2708/patches-4.9/950-0050-firmware-bcm2835-Support-ARCH_BCM270x.patch (limited to 'target/linux/brcm2708/patches-4.9/950-0050-firmware-bcm2835-Support-ARCH_BCM270x.patch') diff --git a/target/linux/brcm2708/patches-4.9/950-0050-firmware-bcm2835-Support-ARCH_BCM270x.patch b/target/linux/brcm2708/patches-4.9/950-0050-firmware-bcm2835-Support-ARCH_BCM270x.patch new file mode 100644 index 0000000000..ecaf614c16 --- /dev/null +++ b/target/linux/brcm2708/patches-4.9/950-0050-firmware-bcm2835-Support-ARCH_BCM270x.patch @@ -0,0 +1,83 @@ +From f281fd683848cd432f7b73c869676be6362ce1b8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= +Date: Fri, 26 Jun 2015 14:25:01 +0200 +Subject: [PATCH] firmware: bcm2835: Support ARCH_BCM270x +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Support booting without Device Tree. +Turn on USB power. +Load driver early because of lacking support for deferred probing +in many drivers. + +Signed-off-by: Noralf Trønnes + +firmware: bcm2835: Don't turn on USB power + +The raspberrypi-power driver is now used to turn on USB power. + +This partly reverts commit: +firmware: bcm2835: Support ARCH_BCM270x + +Signed-off-by: Noralf Trønnes +--- + drivers/firmware/raspberrypi.c | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +--- a/drivers/firmware/raspberrypi.c ++++ b/drivers/firmware/raspberrypi.c +@@ -28,6 +28,8 @@ struct rpi_firmware { + u32 enabled; + }; + ++static struct platform_device *g_pdev; ++ + static DEFINE_MUTEX(transaction_lock); + + static void response_callback(struct mbox_client *cl, void *msg) +@@ -207,6 +209,7 @@ static int rpi_firmware_probe(struct pla + init_completion(&fw->c); + + platform_set_drvdata(pdev, fw); ++ g_pdev = pdev; + + rpi_firmware_print_firmware_revision(fw); + +@@ -218,6 +221,7 @@ static int rpi_firmware_remove(struct pl + struct rpi_firmware *fw = platform_get_drvdata(pdev); + + mbox_free_channel(fw->chan); ++ g_pdev = NULL; + + return 0; + } +@@ -230,7 +234,7 @@ static int rpi_firmware_remove(struct pl + */ + struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node) + { +- struct platform_device *pdev = of_find_device_by_node(firmware_node); ++ struct platform_device *pdev = g_pdev; + + if (!pdev) + return NULL; +@@ -253,7 +257,18 @@ static struct platform_driver rpi_firmwa + .probe = rpi_firmware_probe, + .remove = rpi_firmware_remove, + }; +-module_platform_driver(rpi_firmware_driver); ++ ++static int __init rpi_firmware_init(void) ++{ ++ return platform_driver_register(&rpi_firmware_driver); ++} ++subsys_initcall(rpi_firmware_init); ++ ++static void __init rpi_firmware_exit(void) ++{ ++ platform_driver_unregister(&rpi_firmware_driver); ++} ++module_exit(rpi_firmware_exit); + + MODULE_AUTHOR("Eric Anholt "); + MODULE_DESCRIPTION("Raspberry Pi firmware driver"); -- cgit v1.2.3