* Re: [PATCH] gpiolib: Ensure struct gpio is always defined
From: Mark Brown @ 2011-10-24 14:05 UTC (permalink / raw)
To: Grant Likely; +Cc: Grant Likely, linux-kernel, patches
In-Reply-To: <20111024140421.GW8708@ponder.secretlab.ca>
On Mon, Oct 24, 2011 at 04:04:21PM +0200, Grant Likely wrote:
> What does "flob" mean?
It means "I should have deleted this non-empty changelog I wrote so I
could squash down the commit.".
^ permalink raw reply
* [PATCH V3 1/2] ARM: at91: dt: at91sam9g45 family and board device tree files
From: Nicolas Ferre @ 2011-10-24 14:05 UTC (permalink / raw)
To: robherring2, grant.likely
Cc: linux-kernel, linux-arm-kernel, devicetree-discuss, plagnioj,
Nicolas Ferre
In-Reply-To: <4E9F8226.4030503@gmail.com>
Create a new device tree source file for Atmel at91sam9g45 SoC family.
The Evaluation Kit at91sam9m10g45ek includes it.
This first basic support will be populated as drivers and boards will be
converted to device tree.
Contains serial, dma and interrupt controllers.
The generic board file still takes advantage of platform data for early serial
init. As we need a storage media and the NAND flash driver is not converted to
DT yet, we keep old initialization for it.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
V3:
- additional clock lookup for device tree handling
- devices disabled in dtsi file so that only useful devices are
enabled in dts files
V2: foundation for AT91SAM generic support
- device tree focused board file
- inclusion of USART DT support
- early USART and NAND still using platform data
arch/arm/boot/dts/at91sam9g45.dtsi | 106 +++++++++++++++++++++++++++
arch/arm/boot/dts/at91sam9m10g45ek.dts | 35 +++++++++
arch/arm/mach-at91/Kconfig | 11 +++
arch/arm/mach-at91/Makefile | 3 +
arch/arm/mach-at91/Makefile.boot | 2 +
arch/arm/mach-at91/at91sam9g45.c | 6 ++
arch/arm/mach-at91/board-dt.c | 122 ++++++++++++++++++++++++++++++++
7 files changed, 285 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/boot/dts/at91sam9g45.dtsi
create mode 100644 arch/arm/boot/dts/at91sam9m10g45ek.dts
create mode 100644 arch/arm/mach-at91/board-dt.c
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
new file mode 100644
index 0000000..db6a452
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -0,0 +1,106 @@
+/*
+ * at91sam9g45.dtsi - Device Tree Include file for AT91SAM9G45 family SoC
+ * applies to AT91SAM9G45, AT91SAM9M10,
+ * AT91SAM9G46, AT91SAM9M11 SoC
+ *
+ * Copyright (C) 2011 Atmel,
+ * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+ model = "Atmel AT91SAM9G45 family SoC";
+ compatible = "atmel,at91sam9g45";
+ interrupt-parent = <&aic>;
+
+ aliases {
+ serial0 = &dbgu;
+ serial1 = &usart0;
+ serial2 = &usart1;
+ serial3 = &usart2;
+ serial4 = &usart3;
+ };
+ cpus {
+ cpu@0 {
+ compatible = "arm,arm926ejs";
+ };
+ };
+
+ memory@70000000 {
+ reg = <0x70000000 0x10000000>;
+ };
+
+ ahb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ apb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ aic: interrupt-controller@fffff000 {
+ #interrupt-cells = <1>;
+ compatible = "atmel,at91rm9200-aic";
+ interrupt-controller;
+ interrupt-parent;
+ reg = <0xfffff000 0x200>;
+ };
+
+ dma: dma-controller@ffffec00 {
+ compatible = "atmel,at91sam9g45-dma";
+ reg = <0xffffec00 0x200>;
+ interrupts = <21>;
+ };
+
+ dbgu: serial@ffffee00 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xffffee00 0x200>;
+ interrupts = <1>;
+ status = "disabled";
+ };
+
+ usart0: serial@fff8c000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfff8c000 0x200>;
+ interrupts = <7>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart1: serial@fff90000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfff90000 0x200>;
+ interrupts = <8>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart2: serial@fff94000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfff94000 0x200>;
+ interrupts = <9>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart3: serial@fff98000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfff98000 0x200>;
+ interrupts = <10>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
new file mode 100644
index 0000000..85b34f5
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -0,0 +1,35 @@
+/*
+ * at91sam9m10g45ek.dts - Device Tree file for AT91SAM9M10G45-EK board
+ *
+ * Copyright (C) 2011 Atmel,
+ * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+/include/ "at91sam9g45.dtsi"
+
+/ {
+ model = "Atmel AT91SAM9M10G45-EK";
+ compatible = "atmel,at91sam9m10g45ek", "atmel,at91sam9g45", "atmel,at91sam9";
+
+ chosen {
+ bootargs = "mem=64M console=ttyS0,115200 mtdparts=atmel_nand:4M(bootstrap/uboot/kernel)ro,60M(rootfs),-(data) root=/dev/mtdblock1 rw rootfstype=jffs2";
+ };
+
+ memory@70000000 {
+ reg = <0x70000000 0x4000000>;
+ };
+
+ ahb {
+ apb {
+ dbgu: serial@ffffee00 {
+ status = "okay";
+ };
+
+ usart1: serial@fff90000 {
+ status = "okay";
+ };
+ };
+ };
+};
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 2248467..4b59d96 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -442,6 +442,17 @@ endif
# ----------------------------------------------------------
+comment "Generic Board Type"
+
+config MACH_AT91SAM_DT
+ bool "Atmel AT91SAM Evaluation Kits with device-tree support"
+ select USE_OF
+ help
+ Select this if you want to experiment device-tree with
+ an Atmel Evaluation Kit.
+
+# ----------------------------------------------------------
+
comment "AT91 Board Options"
config MTD_AT91_DATAFLASH_CARD
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index bf57e8b..3ff245e 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -74,6 +74,9 @@ obj-$(CONFIG_MACH_SNAPPER_9260) += board-snapper9260.o
# AT91SAM9G45 board-specific support
obj-$(CONFIG_MACH_AT91SAM9M10G45EK) += board-sam9m10g45ek.o
+# AT91SAM board with device-tree
+obj-$(CONFIG_MACH_AT91SAM_DT) += board-dt.o
+
# AT91CAP9 board-specific support
obj-$(CONFIG_MACH_AT91CAP9ADK) += board-cap9adk.o
diff --git a/arch/arm/mach-at91/Makefile.boot b/arch/arm/mach-at91/Makefile.boot
index 3462b81..d278863 100644
--- a/arch/arm/mach-at91/Makefile.boot
+++ b/arch/arm/mach-at91/Makefile.boot
@@ -16,3 +16,5 @@ else
params_phys-y := 0x20000100
initrd_phys-y := 0x20410000
endif
+
+dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index e04c5fb..8baf5a1 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -215,6 +215,12 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tcb0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
+ /* more usart lookup table for DT entries */
+ CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck),
+ CLKDEV_CON_DEV_ID("usart", "fff8c000.serial", &usart0_clk),
+ CLKDEV_CON_DEV_ID("usart", "fff90000.serial", &usart1_clk),
+ CLKDEV_CON_DEV_ID("usart", "fff94000.serial", &usart2_clk),
+ CLKDEV_CON_DEV_ID("usart", "fff98000.serial", &usart3_clk),
};
static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c
new file mode 100644
index 0000000..77fe466
--- /dev/null
+++ b/arch/arm/mach-at91/board-dt.c
@@ -0,0 +1,122 @@
+/*
+ * Setup code for AT91SAM Evaluation Kits with Device Tree support
+ *
+ * Covers: * AT91SAM9G45-EKES board
+ * * AT91SAM9M10-EKES board
+ * * AT91SAM9M10G45-EK board
+ *
+ * Copyright (C) 2011 Atmel,
+ * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/gpio.h>
+#include <linux/irqdomain.h>
+#include <linux/of_irq.h>
+#include <linux/of_platform.h>
+
+#include <mach/hardware.h>
+#include <mach/board.h>
+#include <mach/system_rev.h>
+#include <mach/at91sam9_smc.h>
+
+#include <asm/setup.h>
+#include <asm/irq.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
+#include "sam9_smc.h"
+#include "generic.h"
+
+
+static void __init ek_init_early(void)
+{
+ /* Initialize processor: 12.000 MHz crystal */
+ at91_initialize(12000000);
+
+ /* DGBU on ttyS0. (Rx & Tx only) */
+ at91_register_uart(0, 0, 0);
+
+ /* set serial console to ttyS0 (ie, DBGU) */
+ at91_set_serial_console(0);
+}
+
+/* det_pin is not connected */
+static struct atmel_nand_data __initdata ek_nand_data = {
+ .ale = 21,
+ .cle = 22,
+ .rdy_pin = AT91_PIN_PC8,
+ .enable_pin = AT91_PIN_PC14,
+};
+
+static struct sam9_smc_config __initdata ek_nand_smc_config = {
+ .ncs_read_setup = 0,
+ .nrd_setup = 2,
+ .ncs_write_setup = 0,
+ .nwe_setup = 2,
+
+ .ncs_read_pulse = 4,
+ .nrd_pulse = 4,
+ .ncs_write_pulse = 4,
+ .nwe_pulse = 4,
+
+ .read_cycle = 7,
+ .write_cycle = 7,
+
+ .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE,
+ .tdf_cycles = 3,
+};
+
+static void __init ek_add_device_nand(void)
+{
+ ek_nand_data.bus_width_16 = board_have_nand_16bit();
+ /* setup bus-width (8 or 16) */
+ if (ek_nand_data.bus_width_16)
+ ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
+ else
+ ek_nand_smc_config.mode |= AT91_SMC_DBW_8;
+
+ /* configure chip-select 3 (NAND) */
+ sam9_smc_configure(3, &ek_nand_smc_config);
+
+ at91_add_device_nand(&ek_nand_data);
+}
+
+static const struct of_device_id aic_of_match[] __initconst = {
+ { .compatible = "atmel,at91rm9200-aic", },
+ {},
+};
+
+static void __init at91_dt_init_irq(void)
+{
+ irq_domain_generate_simple(aic_of_match, 0xfffff000, 0);
+ at91_init_irq_default();
+}
+
+static void __init at91_dt_device_init(void)
+{
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+ /* NAND */
+ ek_add_device_nand();
+}
+
+static const char *at91_dt_board_compat[] __initdata = {
+ "atmel,at91sam9m10g45ek",
+ NULL
+};
+
+DT_MACHINE_START(at91sam9m10g45ek_dt, "Atmel AT91SAM (Device Tree)")
+ /* Maintainer: Atmel */
+ .timer = &at91sam926x_timer,
+ .map_io = at91_map_io,
+ .init_early = ek_init_early,
+ .init_irq = at91_dt_init_irq,
+ .init_machine = at91_dt_device_init,
+ .dt_compat = at91_dt_board_compat,
+MACHINE_END
--
1.7.5.4
^ permalink raw reply related
* [PATCH V3 2/2] ARM: at91: add at91sam9g20 and Calao USB A9G20 DT support
From: Nicolas Ferre @ 2011-10-24 14:05 UTC (permalink / raw)
To: robherring2, grant.likely
Cc: linux-kernel, linux-arm-kernel, devicetree-discuss, plagnioj,
Nicolas Ferre
In-Reply-To: <15ab652499e7f6f8a26724bfd90643a8f3f96ad9.1319464310.git.nicolas.ferre@atmel.com>
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
arch/arm/boot/dts/at91sam9g20.dtsi | 119 ++++++++++++++++++++++++++++++++++++
arch/arm/boot/dts/usb_a9g20.dts | 30 +++++++++
arch/arm/mach-at91/Makefile.boot | 2 +-
arch/arm/mach-at91/at91sam9260.c | 8 +++
arch/arm/mach-at91/board-dt.c | 1 +
5 files changed, 159 insertions(+), 1 deletions(-)
create mode 100644 arch/arm/boot/dts/at91sam9g20.dtsi
create mode 100644 arch/arm/boot/dts/usb_a9g20.dts
diff --git a/arch/arm/boot/dts/at91sam9g20.dtsi b/arch/arm/boot/dts/at91sam9g20.dtsi
new file mode 100644
index 0000000..aeef042
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9g20.dtsi
@@ -0,0 +1,119 @@
+/*
+ * at91sam9g20.dtsi - Device Tree Include file for AT91SAM9G20 family SoC
+ *
+ * Copyright (C) 2011 Atmel,
+ * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>,
+ * 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+ model = "Atmel AT91SAM9G20 family SoC";
+ compatible = "atmel,at91sam9g20";
+ interrupt-parent = <&aic>;
+
+ aliases {
+ serial0 = &dbgu;
+ serial1 = &usart0;
+ serial2 = &usart1;
+ serial3 = &usart2;
+ serial4 = &usart3;
+ serial5 = &usart4;
+ serial6 = &usart5;
+ };
+ cpus {
+ cpu@0 {
+ compatible = "arm,arm926ejs";
+ };
+ };
+
+ memory@20000000 {
+ reg = <0x20000000 0x08000000>;
+ };
+
+ ahb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ apb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ aic: interrupt-controller@fffff000 {
+ #interrupt-cells = <1>;
+ compatible = "atmel,at91rm9200-aic";
+ interrupt-controller;
+ interrupt-parent;
+ reg = <0xfffff000 0x200>;
+ };
+
+ dbgu: serial@fffff200 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffff200 0x200>;
+ interrupts = <1>;
+ status = "disabled";
+ };
+
+ usart0: serial@fffb0000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffb0000 0x200>;
+ interrupts = <6>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart1: serial@fffb4000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffb4000 0x200>;
+ interrupts = <7>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart2: serial@fffb8000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffb8000 0x200>;
+ interrupts = <8>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart3: serial@fffd0000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffd0000 0x200>;
+ interrupts = <23>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart4: serial@fffd4000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffd4000 0x200>;
+ interrupts = <24>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart5: serial@fffd8000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffd8000 0x200>;
+ interrupts = <25>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/usb_a9g20.dts b/arch/arm/boot/dts/usb_a9g20.dts
new file mode 100644
index 0000000..a060f6c
--- /dev/null
+++ b/arch/arm/boot/dts/usb_a9g20.dts
@@ -0,0 +1,30 @@
+/*
+ * usb_a9g20.dts - Device Tree file for Caloa USB A9G20 board
+ *
+ * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+/include/ "at91sam9g20.dtsi"
+
+/ {
+ model = "Calao USB A9G20";
+ compatible = "calao,usb-a9g20", "atmel,at91sam9g20", "atmel,at91sam9";
+
+ chosen {
+ bootargs = "mem=64M console=ttyS0,115200 mtdparts=atmel_nand:128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data) root=/dev/mtdblock5 rw rootfstype=ubifs";
+ };
+
+ memory@70000000 {
+ reg = <0x20000000 0x4000000>;
+ };
+
+ ahb {
+ apb {
+ dbgu: serial@fffff200 {
+ status = "okay";
+ };
+ };
+ };
+};
diff --git a/arch/arm/mach-at91/Makefile.boot b/arch/arm/mach-at91/Makefile.boot
index d278863..08c665a 100644
--- a/arch/arm/mach-at91/Makefile.boot
+++ b/arch/arm/mach-at91/Makefile.boot
@@ -17,4 +17,4 @@ params_phys-y := 0x20000100
initrd_phys-y := 0x20410000
endif
-dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb
+dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb usb_a9g20.dtb
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index cb397be..f4518b4 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -199,6 +199,14 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t4_clk", "atmel_tcb.1", &tc4_clk),
CLKDEV_CON_DEV_ID("t5_clk", "atmel_tcb.1", &tc5_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk),
+ /* more usart lookup table for DT entries */
+ CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
+ CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffb4000.serial", &usart1_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffb8000.serial", &usart2_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffd0000.serial", &usart3_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffd4000.serial", &usart4_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffd8000.serial", &usart5_clk),
};
static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c
index 77fe466..a3d22f8 100644
--- a/arch/arm/mach-at91/board-dt.c
+++ b/arch/arm/mach-at91/board-dt.c
@@ -108,6 +108,7 @@ static void __init at91_dt_device_init(void)
static const char *at91_dt_board_compat[] __initdata = {
"atmel,at91sam9m10g45ek",
+ "calao,usb-a9g20",
NULL
};
--
1.7.5.4
^ permalink raw reply related
* Re: [PATCH V2 2/4] MIPS: Add board support for Loongson1B
From: Kelvin Cheung @ 2011-10-24 14:05 UTC (permalink / raw)
To: Giuseppe CAVALLARO
Cc: Wu Zhangjin, linux-mips, linux-kernel, ralf, r0bertz, netdev
In-Reply-To: <4EA557B2.4020504@st.com>
2011/10/24, Giuseppe CAVALLARO <peppe.cavallaro@st.com>:
> Hello Kelvin.
>
> On 10/24/2011 12:36 PM, Kelvin Cheung wrote:
>
> [snip]
>
>> According to datasheet of Loongson 1B, the buffer size in RX/TX
>> descriptor is only 2KB. So the Loongson1B's GMAC could not handle
>> jumbo frames. And the second buffer is useless in this case. Am I
>> right? Is there a better way than ifdef CONFIG_MACH_LOONGSON1 to
>> avoid duplicate code?
>
> Sorry for my misunderstanding.
>
> I think you have to use the normal descriptor and remove the enh_desc
> from the platform w/o modifying the driver at all.
>
> The driver will be able to select/configure all automatically (also jumbo).
>
> Let me know.
That's the problem.
The bitfield definition of Loongson1B is also different from normal descriptor.
Moreover, I want to enable the TX checksum offload function which is
not supported in normal descriptor.
Any suggestions?
> Note:
> IIRC, there is a bit difference in case of normal descriptors for
> Synopsys databook newer than the 1.91 (I used for testing this mode).
> In any case, I remember that, on some platforms, the normal descriptors
> have been used w/o problems also on these new chip generations.
>
> Peppe
>
>
--
Best Regards!
Kelvin
^ permalink raw reply
* [PATCH V3 2/2] ARM: at91: add at91sam9g20 and Calao USB A9G20 DT support
From: Nicolas Ferre @ 2011-10-24 14:05 UTC (permalink / raw)
To: robherring2, grant.likely
Cc: Nicolas Ferre, devicetree-discuss, plagnioj, linux-kernel,
linux-arm-kernel
In-Reply-To: <15ab652499e7f6f8a26724bfd90643a8f3f96ad9.1319464310.git.nicolas.ferre@atmel.com>
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
arch/arm/boot/dts/at91sam9g20.dtsi | 119 ++++++++++++++++++++++++++++++++++++
arch/arm/boot/dts/usb_a9g20.dts | 30 +++++++++
arch/arm/mach-at91/Makefile.boot | 2 +-
arch/arm/mach-at91/at91sam9260.c | 8 +++
arch/arm/mach-at91/board-dt.c | 1 +
5 files changed, 159 insertions(+), 1 deletions(-)
create mode 100644 arch/arm/boot/dts/at91sam9g20.dtsi
create mode 100644 arch/arm/boot/dts/usb_a9g20.dts
diff --git a/arch/arm/boot/dts/at91sam9g20.dtsi b/arch/arm/boot/dts/at91sam9g20.dtsi
new file mode 100644
index 0000000..aeef042
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9g20.dtsi
@@ -0,0 +1,119 @@
+/*
+ * at91sam9g20.dtsi - Device Tree Include file for AT91SAM9G20 family SoC
+ *
+ * Copyright (C) 2011 Atmel,
+ * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>,
+ * 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+ model = "Atmel AT91SAM9G20 family SoC";
+ compatible = "atmel,at91sam9g20";
+ interrupt-parent = <&aic>;
+
+ aliases {
+ serial0 = &dbgu;
+ serial1 = &usart0;
+ serial2 = &usart1;
+ serial3 = &usart2;
+ serial4 = &usart3;
+ serial5 = &usart4;
+ serial6 = &usart5;
+ };
+ cpus {
+ cpu@0 {
+ compatible = "arm,arm926ejs";
+ };
+ };
+
+ memory@20000000 {
+ reg = <0x20000000 0x08000000>;
+ };
+
+ ahb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ apb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ aic: interrupt-controller@fffff000 {
+ #interrupt-cells = <1>;
+ compatible = "atmel,at91rm9200-aic";
+ interrupt-controller;
+ interrupt-parent;
+ reg = <0xfffff000 0x200>;
+ };
+
+ dbgu: serial@fffff200 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffff200 0x200>;
+ interrupts = <1>;
+ status = "disabled";
+ };
+
+ usart0: serial@fffb0000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffb0000 0x200>;
+ interrupts = <6>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart1: serial@fffb4000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffb4000 0x200>;
+ interrupts = <7>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart2: serial@fffb8000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffb8000 0x200>;
+ interrupts = <8>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart3: serial@fffd0000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffd0000 0x200>;
+ interrupts = <23>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart4: serial@fffd4000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffd4000 0x200>;
+ interrupts = <24>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart5: serial@fffd8000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffd8000 0x200>;
+ interrupts = <25>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/usb_a9g20.dts b/arch/arm/boot/dts/usb_a9g20.dts
new file mode 100644
index 0000000..a060f6c
--- /dev/null
+++ b/arch/arm/boot/dts/usb_a9g20.dts
@@ -0,0 +1,30 @@
+/*
+ * usb_a9g20.dts - Device Tree file for Caloa USB A9G20 board
+ *
+ * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+/include/ "at91sam9g20.dtsi"
+
+/ {
+ model = "Calao USB A9G20";
+ compatible = "calao,usb-a9g20", "atmel,at91sam9g20", "atmel,at91sam9";
+
+ chosen {
+ bootargs = "mem=64M console=ttyS0,115200 mtdparts=atmel_nand:128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data) root=/dev/mtdblock5 rw rootfstype=ubifs";
+ };
+
+ memory@70000000 {
+ reg = <0x20000000 0x4000000>;
+ };
+
+ ahb {
+ apb {
+ dbgu: serial@fffff200 {
+ status = "okay";
+ };
+ };
+ };
+};
diff --git a/arch/arm/mach-at91/Makefile.boot b/arch/arm/mach-at91/Makefile.boot
index d278863..08c665a 100644
--- a/arch/arm/mach-at91/Makefile.boot
+++ b/arch/arm/mach-at91/Makefile.boot
@@ -17,4 +17,4 @@ params_phys-y := 0x20000100
initrd_phys-y := 0x20410000
endif
-dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb
+dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb usb_a9g20.dtb
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index cb397be..f4518b4 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -199,6 +199,14 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t4_clk", "atmel_tcb.1", &tc4_clk),
CLKDEV_CON_DEV_ID("t5_clk", "atmel_tcb.1", &tc5_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk),
+ /* more usart lookup table for DT entries */
+ CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
+ CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffb4000.serial", &usart1_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffb8000.serial", &usart2_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffd0000.serial", &usart3_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffd4000.serial", &usart4_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffd8000.serial", &usart5_clk),
};
static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c
index 77fe466..a3d22f8 100644
--- a/arch/arm/mach-at91/board-dt.c
+++ b/arch/arm/mach-at91/board-dt.c
@@ -108,6 +108,7 @@ static void __init at91_dt_device_init(void)
static const char *at91_dt_board_compat[] __initdata = {
"atmel,at91sam9m10g45ek",
+ "calao,usb-a9g20",
NULL
};
--
1.7.5.4
^ permalink raw reply related
* [PATCH V3 2/2] ARM: at91: add at91sam9g20 and Calao USB A9G20 DT support
From: Nicolas Ferre @ 2011-10-24 14:05 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <15ab652499e7f6f8a26724bfd90643a8f3f96ad9.1319464310.git.nicolas.ferre@atmel.com>
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
arch/arm/boot/dts/at91sam9g20.dtsi | 119 ++++++++++++++++++++++++++++++++++++
arch/arm/boot/dts/usb_a9g20.dts | 30 +++++++++
arch/arm/mach-at91/Makefile.boot | 2 +-
arch/arm/mach-at91/at91sam9260.c | 8 +++
arch/arm/mach-at91/board-dt.c | 1 +
5 files changed, 159 insertions(+), 1 deletions(-)
create mode 100644 arch/arm/boot/dts/at91sam9g20.dtsi
create mode 100644 arch/arm/boot/dts/usb_a9g20.dts
diff --git a/arch/arm/boot/dts/at91sam9g20.dtsi b/arch/arm/boot/dts/at91sam9g20.dtsi
new file mode 100644
index 0000000..aeef042
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9g20.dtsi
@@ -0,0 +1,119 @@
+/*
+ * at91sam9g20.dtsi - Device Tree Include file for AT91SAM9G20 family SoC
+ *
+ * Copyright (C) 2011 Atmel,
+ * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>,
+ * 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+ model = "Atmel AT91SAM9G20 family SoC";
+ compatible = "atmel,at91sam9g20";
+ interrupt-parent = <&aic>;
+
+ aliases {
+ serial0 = &dbgu;
+ serial1 = &usart0;
+ serial2 = &usart1;
+ serial3 = &usart2;
+ serial4 = &usart3;
+ serial5 = &usart4;
+ serial6 = &usart5;
+ };
+ cpus {
+ cpu at 0 {
+ compatible = "arm,arm926ejs";
+ };
+ };
+
+ memory at 20000000 {
+ reg = <0x20000000 0x08000000>;
+ };
+
+ ahb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ apb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ aic: interrupt-controller at fffff000 {
+ #interrupt-cells = <1>;
+ compatible = "atmel,at91rm9200-aic";
+ interrupt-controller;
+ interrupt-parent;
+ reg = <0xfffff000 0x200>;
+ };
+
+ dbgu: serial at fffff200 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffff200 0x200>;
+ interrupts = <1>;
+ status = "disabled";
+ };
+
+ usart0: serial at fffb0000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffb0000 0x200>;
+ interrupts = <6>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart1: serial at fffb4000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffb4000 0x200>;
+ interrupts = <7>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart2: serial at fffb8000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffb8000 0x200>;
+ interrupts = <8>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart3: serial at fffd0000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffd0000 0x200>;
+ interrupts = <23>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart4: serial at fffd4000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffd4000 0x200>;
+ interrupts = <24>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart5: serial at fffd8000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfffd8000 0x200>;
+ interrupts = <25>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/usb_a9g20.dts b/arch/arm/boot/dts/usb_a9g20.dts
new file mode 100644
index 0000000..a060f6c
--- /dev/null
+++ b/arch/arm/boot/dts/usb_a9g20.dts
@@ -0,0 +1,30 @@
+/*
+ * usb_a9g20.dts - Device Tree file for Caloa USB A9G20 board
+ *
+ * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+/include/ "at91sam9g20.dtsi"
+
+/ {
+ model = "Calao USB A9G20";
+ compatible = "calao,usb-a9g20", "atmel,at91sam9g20", "atmel,at91sam9";
+
+ chosen {
+ bootargs = "mem=64M console=ttyS0,115200 mtdparts=atmel_nand:128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data) root=/dev/mtdblock5 rw rootfstype=ubifs";
+ };
+
+ memory at 70000000 {
+ reg = <0x20000000 0x4000000>;
+ };
+
+ ahb {
+ apb {
+ dbgu: serial at fffff200 {
+ status = "okay";
+ };
+ };
+ };
+};
diff --git a/arch/arm/mach-at91/Makefile.boot b/arch/arm/mach-at91/Makefile.boot
index d278863..08c665a 100644
--- a/arch/arm/mach-at91/Makefile.boot
+++ b/arch/arm/mach-at91/Makefile.boot
@@ -17,4 +17,4 @@ params_phys-y := 0x20000100
initrd_phys-y := 0x20410000
endif
-dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb
+dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb usb_a9g20.dtb
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index cb397be..f4518b4 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -199,6 +199,14 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t4_clk", "atmel_tcb.1", &tc4_clk),
CLKDEV_CON_DEV_ID("t5_clk", "atmel_tcb.1", &tc5_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc_clk),
+ /* more usart lookup table for DT entries */
+ CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
+ CLKDEV_CON_DEV_ID("usart", "fffb0000.serial", &usart0_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffb4000.serial", &usart1_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffb8000.serial", &usart2_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffd0000.serial", &usart3_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffd4000.serial", &usart4_clk),
+ CLKDEV_CON_DEV_ID("usart", "fffd8000.serial", &usart5_clk),
};
static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c
index 77fe466..a3d22f8 100644
--- a/arch/arm/mach-at91/board-dt.c
+++ b/arch/arm/mach-at91/board-dt.c
@@ -108,6 +108,7 @@ static void __init at91_dt_device_init(void)
static const char *at91_dt_board_compat[] __initdata = {
"atmel,at91sam9m10g45ek",
+ "calao,usb-a9g20",
NULL
};
--
1.7.5.4
^ permalink raw reply related
* [PATCH V3 1/2] ARM: at91: dt: at91sam9g45 family and board device tree files
From: Nicolas Ferre @ 2011-10-24 14:05 UTC (permalink / raw)
To: robherring2-Re5JQEeQqe8AvxtiuMwx3w,
grant.likely-s3s/WqlpOiPyB63q8FvJNQ
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <4E9F8226.4030503-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Create a new device tree source file for Atmel at91sam9g45 SoC family.
The Evaluation Kit at91sam9m10g45ek includes it.
This first basic support will be populated as drivers and boards will be
converted to device tree.
Contains serial, dma and interrupt controllers.
The generic board file still takes advantage of platform data for early serial
init. As we need a storage media and the NAND flash driver is not converted to
DT yet, we keep old initialization for it.
Signed-off-by: Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
---
V3:
- additional clock lookup for device tree handling
- devices disabled in dtsi file so that only useful devices are
enabled in dts files
V2: foundation for AT91SAM generic support
- device tree focused board file
- inclusion of USART DT support
- early USART and NAND still using platform data
arch/arm/boot/dts/at91sam9g45.dtsi | 106 +++++++++++++++++++++++++++
arch/arm/boot/dts/at91sam9m10g45ek.dts | 35 +++++++++
arch/arm/mach-at91/Kconfig | 11 +++
arch/arm/mach-at91/Makefile | 3 +
arch/arm/mach-at91/Makefile.boot | 2 +
arch/arm/mach-at91/at91sam9g45.c | 6 ++
arch/arm/mach-at91/board-dt.c | 122 ++++++++++++++++++++++++++++++++
7 files changed, 285 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/boot/dts/at91sam9g45.dtsi
create mode 100644 arch/arm/boot/dts/at91sam9m10g45ek.dts
create mode 100644 arch/arm/mach-at91/board-dt.c
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
new file mode 100644
index 0000000..db6a452
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -0,0 +1,106 @@
+/*
+ * at91sam9g45.dtsi - Device Tree Include file for AT91SAM9G45 family SoC
+ * applies to AT91SAM9G45, AT91SAM9M10,
+ * AT91SAM9G46, AT91SAM9M11 SoC
+ *
+ * Copyright (C) 2011 Atmel,
+ * 2011 Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+ model = "Atmel AT91SAM9G45 family SoC";
+ compatible = "atmel,at91sam9g45";
+ interrupt-parent = <&aic>;
+
+ aliases {
+ serial0 = &dbgu;
+ serial1 = &usart0;
+ serial2 = &usart1;
+ serial3 = &usart2;
+ serial4 = &usart3;
+ };
+ cpus {
+ cpu@0 {
+ compatible = "arm,arm926ejs";
+ };
+ };
+
+ memory@70000000 {
+ reg = <0x70000000 0x10000000>;
+ };
+
+ ahb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ apb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ aic: interrupt-controller@fffff000 {
+ #interrupt-cells = <1>;
+ compatible = "atmel,at91rm9200-aic";
+ interrupt-controller;
+ interrupt-parent;
+ reg = <0xfffff000 0x200>;
+ };
+
+ dma: dma-controller@ffffec00 {
+ compatible = "atmel,at91sam9g45-dma";
+ reg = <0xffffec00 0x200>;
+ interrupts = <21>;
+ };
+
+ dbgu: serial@ffffee00 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xffffee00 0x200>;
+ interrupts = <1>;
+ status = "disabled";
+ };
+
+ usart0: serial@fff8c000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfff8c000 0x200>;
+ interrupts = <7>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart1: serial@fff90000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfff90000 0x200>;
+ interrupts = <8>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart2: serial@fff94000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfff94000 0x200>;
+ interrupts = <9>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart3: serial@fff98000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfff98000 0x200>;
+ interrupts = <10>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
new file mode 100644
index 0000000..85b34f5
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -0,0 +1,35 @@
+/*
+ * at91sam9m10g45ek.dts - Device Tree file for AT91SAM9M10G45-EK board
+ *
+ * Copyright (C) 2011 Atmel,
+ * 2011 Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+/include/ "at91sam9g45.dtsi"
+
+/ {
+ model = "Atmel AT91SAM9M10G45-EK";
+ compatible = "atmel,at91sam9m10g45ek", "atmel,at91sam9g45", "atmel,at91sam9";
+
+ chosen {
+ bootargs = "mem=64M console=ttyS0,115200 mtdparts=atmel_nand:4M(bootstrap/uboot/kernel)ro,60M(rootfs),-(data) root=/dev/mtdblock1 rw rootfstype=jffs2";
+ };
+
+ memory@70000000 {
+ reg = <0x70000000 0x4000000>;
+ };
+
+ ahb {
+ apb {
+ dbgu: serial@ffffee00 {
+ status = "okay";
+ };
+
+ usart1: serial@fff90000 {
+ status = "okay";
+ };
+ };
+ };
+};
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 2248467..4b59d96 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -442,6 +442,17 @@ endif
# ----------------------------------------------------------
+comment "Generic Board Type"
+
+config MACH_AT91SAM_DT
+ bool "Atmel AT91SAM Evaluation Kits with device-tree support"
+ select USE_OF
+ help
+ Select this if you want to experiment device-tree with
+ an Atmel Evaluation Kit.
+
+# ----------------------------------------------------------
+
comment "AT91 Board Options"
config MTD_AT91_DATAFLASH_CARD
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index bf57e8b..3ff245e 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -74,6 +74,9 @@ obj-$(CONFIG_MACH_SNAPPER_9260) += board-snapper9260.o
# AT91SAM9G45 board-specific support
obj-$(CONFIG_MACH_AT91SAM9M10G45EK) += board-sam9m10g45ek.o
+# AT91SAM board with device-tree
+obj-$(CONFIG_MACH_AT91SAM_DT) += board-dt.o
+
# AT91CAP9 board-specific support
obj-$(CONFIG_MACH_AT91CAP9ADK) += board-cap9adk.o
diff --git a/arch/arm/mach-at91/Makefile.boot b/arch/arm/mach-at91/Makefile.boot
index 3462b81..d278863 100644
--- a/arch/arm/mach-at91/Makefile.boot
+++ b/arch/arm/mach-at91/Makefile.boot
@@ -16,3 +16,5 @@ else
params_phys-y := 0x20000100
initrd_phys-y := 0x20410000
endif
+
+dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index e04c5fb..8baf5a1 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -215,6 +215,12 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tcb0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
+ /* more usart lookup table for DT entries */
+ CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck),
+ CLKDEV_CON_DEV_ID("usart", "fff8c000.serial", &usart0_clk),
+ CLKDEV_CON_DEV_ID("usart", "fff90000.serial", &usart1_clk),
+ CLKDEV_CON_DEV_ID("usart", "fff94000.serial", &usart2_clk),
+ CLKDEV_CON_DEV_ID("usart", "fff98000.serial", &usart3_clk),
};
static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c
new file mode 100644
index 0000000..77fe466
--- /dev/null
+++ b/arch/arm/mach-at91/board-dt.c
@@ -0,0 +1,122 @@
+/*
+ * Setup code for AT91SAM Evaluation Kits with Device Tree support
+ *
+ * Covers: * AT91SAM9G45-EKES board
+ * * AT91SAM9M10-EKES board
+ * * AT91SAM9M10G45-EK board
+ *
+ * Copyright (C) 2011 Atmel,
+ * 2011 Nicolas Ferre <nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/gpio.h>
+#include <linux/irqdomain.h>
+#include <linux/of_irq.h>
+#include <linux/of_platform.h>
+
+#include <mach/hardware.h>
+#include <mach/board.h>
+#include <mach/system_rev.h>
+#include <mach/at91sam9_smc.h>
+
+#include <asm/setup.h>
+#include <asm/irq.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
+#include "sam9_smc.h"
+#include "generic.h"
+
+
+static void __init ek_init_early(void)
+{
+ /* Initialize processor: 12.000 MHz crystal */
+ at91_initialize(12000000);
+
+ /* DGBU on ttyS0. (Rx & Tx only) */
+ at91_register_uart(0, 0, 0);
+
+ /* set serial console to ttyS0 (ie, DBGU) */
+ at91_set_serial_console(0);
+}
+
+/* det_pin is not connected */
+static struct atmel_nand_data __initdata ek_nand_data = {
+ .ale = 21,
+ .cle = 22,
+ .rdy_pin = AT91_PIN_PC8,
+ .enable_pin = AT91_PIN_PC14,
+};
+
+static struct sam9_smc_config __initdata ek_nand_smc_config = {
+ .ncs_read_setup = 0,
+ .nrd_setup = 2,
+ .ncs_write_setup = 0,
+ .nwe_setup = 2,
+
+ .ncs_read_pulse = 4,
+ .nrd_pulse = 4,
+ .ncs_write_pulse = 4,
+ .nwe_pulse = 4,
+
+ .read_cycle = 7,
+ .write_cycle = 7,
+
+ .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE,
+ .tdf_cycles = 3,
+};
+
+static void __init ek_add_device_nand(void)
+{
+ ek_nand_data.bus_width_16 = board_have_nand_16bit();
+ /* setup bus-width (8 or 16) */
+ if (ek_nand_data.bus_width_16)
+ ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
+ else
+ ek_nand_smc_config.mode |= AT91_SMC_DBW_8;
+
+ /* configure chip-select 3 (NAND) */
+ sam9_smc_configure(3, &ek_nand_smc_config);
+
+ at91_add_device_nand(&ek_nand_data);
+}
+
+static const struct of_device_id aic_of_match[] __initconst = {
+ { .compatible = "atmel,at91rm9200-aic", },
+ {},
+};
+
+static void __init at91_dt_init_irq(void)
+{
+ irq_domain_generate_simple(aic_of_match, 0xfffff000, 0);
+ at91_init_irq_default();
+}
+
+static void __init at91_dt_device_init(void)
+{
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+ /* NAND */
+ ek_add_device_nand();
+}
+
+static const char *at91_dt_board_compat[] __initdata = {
+ "atmel,at91sam9m10g45ek",
+ NULL
+};
+
+DT_MACHINE_START(at91sam9m10g45ek_dt, "Atmel AT91SAM (Device Tree)")
+ /* Maintainer: Atmel */
+ .timer = &at91sam926x_timer,
+ .map_io = at91_map_io,
+ .init_early = ek_init_early,
+ .init_irq = at91_dt_init_irq,
+ .init_machine = at91_dt_device_init,
+ .dt_compat = at91_dt_board_compat,
+MACHINE_END
--
1.7.5.4
^ permalink raw reply related
* [PATCH V3 1/2] ARM: at91: dt: at91sam9g45 family and board device tree files
From: Nicolas Ferre @ 2011-10-24 14:05 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4E9F8226.4030503@gmail.com>
Create a new device tree source file for Atmel at91sam9g45 SoC family.
The Evaluation Kit at91sam9m10g45ek includes it.
This first basic support will be populated as drivers and boards will be
converted to device tree.
Contains serial, dma and interrupt controllers.
The generic board file still takes advantage of platform data for early serial
init. As we need a storage media and the NAND flash driver is not converted to
DT yet, we keep old initialization for it.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
V3:
- additional clock lookup for device tree handling
- devices disabled in dtsi file so that only useful devices are
enabled in dts files
V2: foundation for AT91SAM generic support
- device tree focused board file
- inclusion of USART DT support
- early USART and NAND still using platform data
arch/arm/boot/dts/at91sam9g45.dtsi | 106 +++++++++++++++++++++++++++
arch/arm/boot/dts/at91sam9m10g45ek.dts | 35 +++++++++
arch/arm/mach-at91/Kconfig | 11 +++
arch/arm/mach-at91/Makefile | 3 +
arch/arm/mach-at91/Makefile.boot | 2 +
arch/arm/mach-at91/at91sam9g45.c | 6 ++
arch/arm/mach-at91/board-dt.c | 122 ++++++++++++++++++++++++++++++++
7 files changed, 285 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/boot/dts/at91sam9g45.dtsi
create mode 100644 arch/arm/boot/dts/at91sam9m10g45ek.dts
create mode 100644 arch/arm/mach-at91/board-dt.c
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
new file mode 100644
index 0000000..db6a452
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -0,0 +1,106 @@
+/*
+ * at91sam9g45.dtsi - Device Tree Include file for AT91SAM9G45 family SoC
+ * applies to AT91SAM9G45, AT91SAM9M10,
+ * AT91SAM9G46, AT91SAM9M11 SoC
+ *
+ * Copyright (C) 2011 Atmel,
+ * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+ model = "Atmel AT91SAM9G45 family SoC";
+ compatible = "atmel,at91sam9g45";
+ interrupt-parent = <&aic>;
+
+ aliases {
+ serial0 = &dbgu;
+ serial1 = &usart0;
+ serial2 = &usart1;
+ serial3 = &usart2;
+ serial4 = &usart3;
+ };
+ cpus {
+ cpu at 0 {
+ compatible = "arm,arm926ejs";
+ };
+ };
+
+ memory at 70000000 {
+ reg = <0x70000000 0x10000000>;
+ };
+
+ ahb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ apb {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ aic: interrupt-controller at fffff000 {
+ #interrupt-cells = <1>;
+ compatible = "atmel,at91rm9200-aic";
+ interrupt-controller;
+ interrupt-parent;
+ reg = <0xfffff000 0x200>;
+ };
+
+ dma: dma-controller at ffffec00 {
+ compatible = "atmel,at91sam9g45-dma";
+ reg = <0xffffec00 0x200>;
+ interrupts = <21>;
+ };
+
+ dbgu: serial at ffffee00 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xffffee00 0x200>;
+ interrupts = <1>;
+ status = "disabled";
+ };
+
+ usart0: serial at fff8c000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfff8c000 0x200>;
+ interrupts = <7>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart1: serial at fff90000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfff90000 0x200>;
+ interrupts = <8>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart2: serial at fff94000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfff94000 0x200>;
+ interrupts = <9>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+
+ usart3: serial at fff98000 {
+ compatible = "atmel,at91sam9260-usart";
+ reg = <0xfff98000 0x200>;
+ interrupts = <10>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ status = "disabled";
+ };
+ };
+ };
+};
diff --git a/arch/arm/boot/dts/at91sam9m10g45ek.dts b/arch/arm/boot/dts/at91sam9m10g45ek.dts
new file mode 100644
index 0000000..85b34f5
--- /dev/null
+++ b/arch/arm/boot/dts/at91sam9m10g45ek.dts
@@ -0,0 +1,35 @@
+/*
+ * at91sam9m10g45ek.dts - Device Tree file for AT91SAM9M10G45-EK board
+ *
+ * Copyright (C) 2011 Atmel,
+ * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+/include/ "at91sam9g45.dtsi"
+
+/ {
+ model = "Atmel AT91SAM9M10G45-EK";
+ compatible = "atmel,at91sam9m10g45ek", "atmel,at91sam9g45", "atmel,at91sam9";
+
+ chosen {
+ bootargs = "mem=64M console=ttyS0,115200 mtdparts=atmel_nand:4M(bootstrap/uboot/kernel)ro,60M(rootfs),-(data) root=/dev/mtdblock1 rw rootfstype=jffs2";
+ };
+
+ memory at 70000000 {
+ reg = <0x70000000 0x4000000>;
+ };
+
+ ahb {
+ apb {
+ dbgu: serial at ffffee00 {
+ status = "okay";
+ };
+
+ usart1: serial at fff90000 {
+ status = "okay";
+ };
+ };
+ };
+};
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 2248467..4b59d96 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -442,6 +442,17 @@ endif
# ----------------------------------------------------------
+comment "Generic Board Type"
+
+config MACH_AT91SAM_DT
+ bool "Atmel AT91SAM Evaluation Kits with device-tree support"
+ select USE_OF
+ help
+ Select this if you want to experiment device-tree with
+ an Atmel Evaluation Kit.
+
+# ----------------------------------------------------------
+
comment "AT91 Board Options"
config MTD_AT91_DATAFLASH_CARD
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index bf57e8b..3ff245e 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -74,6 +74,9 @@ obj-$(CONFIG_MACH_SNAPPER_9260) += board-snapper9260.o
# AT91SAM9G45 board-specific support
obj-$(CONFIG_MACH_AT91SAM9M10G45EK) += board-sam9m10g45ek.o
+# AT91SAM board with device-tree
+obj-$(CONFIG_MACH_AT91SAM_DT) += board-dt.o
+
# AT91CAP9 board-specific support
obj-$(CONFIG_MACH_AT91CAP9ADK) += board-cap9adk.o
diff --git a/arch/arm/mach-at91/Makefile.boot b/arch/arm/mach-at91/Makefile.boot
index 3462b81..d278863 100644
--- a/arch/arm/mach-at91/Makefile.boot
+++ b/arch/arm/mach-at91/Makefile.boot
@@ -16,3 +16,5 @@ else
params_phys-y := 0x20000100
initrd_phys-y := 0x20410000
endif
+
+dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index e04c5fb..8baf5a1 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -215,6 +215,12 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.1", &tcb0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
+ /* more usart lookup table for DT entries */
+ CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck),
+ CLKDEV_CON_DEV_ID("usart", "fff8c000.serial", &usart0_clk),
+ CLKDEV_CON_DEV_ID("usart", "fff90000.serial", &usart1_clk),
+ CLKDEV_CON_DEV_ID("usart", "fff94000.serial", &usart2_clk),
+ CLKDEV_CON_DEV_ID("usart", "fff98000.serial", &usart3_clk),
};
static struct clk_lookup usart_clocks_lookups[] = {
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c
new file mode 100644
index 0000000..77fe466
--- /dev/null
+++ b/arch/arm/mach-at91/board-dt.c
@@ -0,0 +1,122 @@
+/*
+ * Setup code for AT91SAM Evaluation Kits with Device Tree support
+ *
+ * Covers: * AT91SAM9G45-EKES board
+ * * AT91SAM9M10-EKES board
+ * * AT91SAM9M10G45-EK board
+ *
+ * Copyright (C) 2011 Atmel,
+ * 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/gpio.h>
+#include <linux/irqdomain.h>
+#include <linux/of_irq.h>
+#include <linux/of_platform.h>
+
+#include <mach/hardware.h>
+#include <mach/board.h>
+#include <mach/system_rev.h>
+#include <mach/at91sam9_smc.h>
+
+#include <asm/setup.h>
+#include <asm/irq.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
+#include "sam9_smc.h"
+#include "generic.h"
+
+
+static void __init ek_init_early(void)
+{
+ /* Initialize processor: 12.000 MHz crystal */
+ at91_initialize(12000000);
+
+ /* DGBU on ttyS0. (Rx & Tx only) */
+ at91_register_uart(0, 0, 0);
+
+ /* set serial console to ttyS0 (ie, DBGU) */
+ at91_set_serial_console(0);
+}
+
+/* det_pin is not connected */
+static struct atmel_nand_data __initdata ek_nand_data = {
+ .ale = 21,
+ .cle = 22,
+ .rdy_pin = AT91_PIN_PC8,
+ .enable_pin = AT91_PIN_PC14,
+};
+
+static struct sam9_smc_config __initdata ek_nand_smc_config = {
+ .ncs_read_setup = 0,
+ .nrd_setup = 2,
+ .ncs_write_setup = 0,
+ .nwe_setup = 2,
+
+ .ncs_read_pulse = 4,
+ .nrd_pulse = 4,
+ .ncs_write_pulse = 4,
+ .nwe_pulse = 4,
+
+ .read_cycle = 7,
+ .write_cycle = 7,
+
+ .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE,
+ .tdf_cycles = 3,
+};
+
+static void __init ek_add_device_nand(void)
+{
+ ek_nand_data.bus_width_16 = board_have_nand_16bit();
+ /* setup bus-width (8 or 16) */
+ if (ek_nand_data.bus_width_16)
+ ek_nand_smc_config.mode |= AT91_SMC_DBW_16;
+ else
+ ek_nand_smc_config.mode |= AT91_SMC_DBW_8;
+
+ /* configure chip-select 3 (NAND) */
+ sam9_smc_configure(3, &ek_nand_smc_config);
+
+ at91_add_device_nand(&ek_nand_data);
+}
+
+static const struct of_device_id aic_of_match[] __initconst = {
+ { .compatible = "atmel,at91rm9200-aic", },
+ {},
+};
+
+static void __init at91_dt_init_irq(void)
+{
+ irq_domain_generate_simple(aic_of_match, 0xfffff000, 0);
+ at91_init_irq_default();
+}
+
+static void __init at91_dt_device_init(void)
+{
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+ /* NAND */
+ ek_add_device_nand();
+}
+
+static const char *at91_dt_board_compat[] __initdata = {
+ "atmel,at91sam9m10g45ek",
+ NULL
+};
+
+DT_MACHINE_START(at91sam9m10g45ek_dt, "Atmel AT91SAM (Device Tree)")
+ /* Maintainer: Atmel */
+ .timer = &at91sam926x_timer,
+ .map_io = at91_map_io,
+ .init_early = ek_init_early,
+ .init_irq = at91_dt_init_irq,
+ .init_machine = at91_dt_device_init,
+ .dt_compat = at91_dt_board_compat,
+MACHINE_END
--
1.7.5.4
^ permalink raw reply related
* Re: [PATCH] gpiolib: Ensure struct gpio is always defined
From: Grant Likely @ 2011-10-24 14:04 UTC (permalink / raw)
To: Mark Brown; +Cc: Grant Likely, linux-kernel, patches
In-Reply-To: <1319462650-23696-1-git-send-email-broonie@opensource.wolfsonmicro.com>
On Mon, Oct 24, 2011 at 03:24:10PM +0200, Mark Brown wrote:
> Currently struct gpio is only defined when using gpiolib which makes the
> stub gpio_request_array() much less useful in drivers than is ideal as
> they can't work with struct gpio. Since there are no other definitions
> in kernel instead make the define always available no matter if gpiolib
> is selectable or selected, ensuring that drivers can always use the
> type.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>
> flob
Applied, thanks.
What does "flob" mean?
g.
> ---
> include/asm-generic/gpio.h | 12 ------------
> include/linux/gpio.h | 22 ++++++++++++----------
> 2 files changed, 12 insertions(+), 22 deletions(-)
>
> diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
> index d494001..d0b6423 100644
> --- a/include/asm-generic/gpio.h
> +++ b/include/asm-generic/gpio.h
> @@ -170,18 +170,6 @@ extern int __gpio_cansleep(unsigned gpio);
>
> extern int __gpio_to_irq(unsigned gpio);
>
> -/**
> - * struct gpio - a structure describing a GPIO with configuration
> - * @gpio: the GPIO number
> - * @flags: GPIO configuration as specified by GPIOF_*
> - * @label: a literal description string of this GPIO
> - */
> -struct gpio {
> - unsigned gpio;
> - unsigned long flags;
> - const char *label;
> -};
> -
> extern int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
> extern int gpio_request_array(const struct gpio *array, size_t num);
> extern void gpio_free_array(const struct gpio *array, size_t num);
> diff --git a/include/linux/gpio.h b/include/linux/gpio.h
> index 17b5a0d..38ac48b 100644
> --- a/include/linux/gpio.h
> +++ b/include/linux/gpio.h
> @@ -14,6 +14,18 @@
> #define GPIOF_OUT_INIT_LOW (GPIOF_DIR_OUT | GPIOF_INIT_LOW)
> #define GPIOF_OUT_INIT_HIGH (GPIOF_DIR_OUT | GPIOF_INIT_HIGH)
>
> +/**
> + * struct gpio - a structure describing a GPIO with configuration
> + * @gpio: the GPIO number
> + * @flags: GPIO configuration as specified by GPIOF_*
> + * @label: a literal description string of this GPIO
> + */
> +struct gpio {
> + unsigned gpio;
> + unsigned long flags;
> + const char *label;
> +};
> +
> #ifdef CONFIG_GENERIC_GPIO
> #include <asm/gpio.h>
>
> @@ -24,18 +36,8 @@
> #include <linux/errno.h>
>
> struct device;
> -struct gpio;
> struct gpio_chip;
>
> -/*
> - * Some platforms don't support the GPIO programming interface.
> - *
> - * In case some driver uses it anyway (it should normally have
> - * depended on GENERIC_GPIO), these routines help the compiler
> - * optimize out much GPIO-related code ... or trigger a runtime
> - * warning when something is wrongly called.
> - */
> -
> static inline bool gpio_is_valid(int number)
> {
> return false;
> --
> 1.7.6.3
>
^ permalink raw reply
* Re: [PATCH 1/2] Bluetooth: Return proper error codes on rfcomm tty init
From: David Herrmann @ 2011-10-24 14:03 UTC (permalink / raw)
To: Anderson Briglia; +Cc: linux-bluetooth, padovan
In-Reply-To: <CALJ2SBJ3qgHV91sS-PXkrS6w7kaxMnHFM0Z-eM2KGUedCZy0nA@mail.gmail.com>
On Mon, Oct 24, 2011 at 3:57 PM, Anderson Briglia
<anderson.briglia@openbossa.org> wrote:
> Hi David,
>
> On Mon, Oct 24, 2011 at 3:30 PM, David Herrmann
> <dh.herrmann@googlemail.com> wrote:
>> Forward error codes from tty core to the rfcomm_init caller instead of using
>> generic -1 errors.
>>
>> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
>> ---
>> net/bluetooth/rfcomm/tty.c | 9 ++++++---
>> 1 files changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
>> index c258796..2b753a3 100644
>> --- a/net/bluetooth/rfcomm/tty.c
>> +++ b/net/bluetooth/rfcomm/tty.c
>> @@ -1155,9 +1155,11 @@ static const struct tty_operations rfcomm_ops = {
>>
>> int __init rfcomm_init_ttys(void)
>> {
>> + int error;
>> +
>> rfcomm_tty_driver = alloc_tty_driver(RFCOMM_TTY_PORTS);
>> if (!rfcomm_tty_driver)
>> - return -1;
>> + return -ENOMEM;
>>
>> rfcomm_tty_driver->owner = THIS_MODULE;
>> rfcomm_tty_driver->driver_name = "rfcomm";
>> @@ -1172,10 +1174,11 @@ int __init rfcomm_init_ttys(void)
>> rfcomm_tty_driver->init_termios.c_lflag &= ~ICANON;
>> tty_set_operations(rfcomm_tty_driver, &rfcomm_ops);
>>
>> - if (tty_register_driver(rfcomm_tty_driver)) {
>> + error = tty_register_driver(rfcomm_tty_driver);
>> + if (error) {
>> BT_ERR("Can't register RFCOMM TTY driver");
>> put_tty_driver(rfcomm_tty_driver);
>> - return -1;
>> + return error;
>
> Since you are defining a new variable (error), how about use it on
> other error paths and add a "goto out" and have just one return path?
Isn't it quite common style to have the first error path return
directly? And then the other error paths use goto. However, there is
only one additional error path left so I don't see any way to make
this look nicer.
With more than 2 error paths I agree, a goto would be more readable,
but I cannot see this making this function look nicer. Anyway, if you
guys want, I can resend with goto's.
> Regards,
>
> Anderson Briglia
Regards
David
^ permalink raw reply
* Re: [RFC PATCH 2/2] tools/perf: Make group_fd static and move its place in __perf_evsel__open()
From: Arnaldo Carvalho de Melo @ 2011-10-24 14:03 UTC (permalink / raw)
To: Deng-Cheng Zhu; +Cc: linux-kernel, Peter Zijlstra, Paul Mackerras, Ingo Molnar
In-Reply-To: <1319453820-12992-3-git-send-email-dczhu@mips.com>
Em Mon, Oct 24, 2011 at 06:57:00PM +0800, Deng-Cheng Zhu escreveu:
> __perf_evsel__open() is called per event, it does not work for all the
> grouped events at one time. So, currently group_fd will alway be -1 for
> the events in a group. This patch fixes it.
>
> Signed-off-by: Deng-Cheng Zhu <dczhu@mips.com>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> ---
> tools/perf/util/evsel.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index e389815..7bd0d9d 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -219,9 +219,8 @@ static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,
> }
>
> for (cpu = 0; cpu < cpus->nr; cpu++) {
> - int group_fd = -1;
> -
> for (thread = 0; thread < threads->nr; thread++) {
> + static int group_fd = -1;
>
> if (!evsel->cgrp)
> pid = threads->map[thread];
Lets not do it that way, using statics for this is humm, ugly, IMHO.
Just pass an integer pointer that is a member of perf_evlist, I'll work
on a patch now.
Thanks for reporting the bug tho!
- Arnaldo
^ permalink raw reply
* Re: [Qemu-devel] [PATCH V2 01/10] configure: Introduce --enable-xen-pci-passthrough.
From: Anthony PERARD @ 2011-10-24 14:02 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: Xen Devel, QEMU-devel
In-Reply-To: <alpine.DEB.2.00.1110201135540.3519@kaball-desktop>
On Thu, Oct 20, 2011 at 11:57, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> wrote:
>
>> diff --git a/Makefile.target b/Makefile.target
>> index 417f23e..c518103 100644
>> --- a/Makefile.target
>> +++ b/Makefile.target
>> @@ -208,6 +208,8 @@ obj-$(CONFIG_NO_XEN) += xen-stub.o
>>
>> obj-i386-$(CONFIG_XEN) += xen_platform.o
>>
>> +# Xen PCI Passthrough
>> +
>
> why?
To reserve a space for futur addition. So on the next patch, I'll just
add the object to compile and not this comment.
And why not ?
--
Anthony PERARD
^ permalink raw reply
* Re: [PATCH v2 BlueZ] Add new command and event for LTK storage support
From: Johan Hedberg @ 2011-10-24 14:03 UTC (permalink / raw)
To: Vinicius Costa Gomes; +Cc: linux-bluetooth
In-Reply-To: <1319463212-13307-1-git-send-email-vinicius.gomes@openbossa.org>
Hi Vinicius,
On Mon, Oct 24, 2011, Vinicius Costa Gomes wrote:
> This documents the new command and event that are to be added to
> the Management API to add support for persistent pairing of LE
> devices.
> ---
>
> Changes:
> - New command code, because new commands were added;
> - Removed the Debug Keys parameter;
>
>
> doc/mgmt-api.txt | 32 ++++++++++++++++++++++++++++++++
> 1 files changed, 32 insertions(+), 0 deletions(-)
Applied, except that the event needed to be 0x0018 instead of 17 because
of the new Passkey Request event.
Johan
^ permalink raw reply
* Re: [PATCH V2 01/10] configure: Introduce --enable-xen-pci-passthrough.
From: Anthony PERARD @ 2011-10-24 14:02 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: Xen Devel, QEMU-devel
In-Reply-To: <alpine.DEB.2.00.1110201135540.3519@kaball-desktop>
On Thu, Oct 20, 2011 at 11:57, Stefano Stabellini
<stefano.stabellini@eu.citrix.com> wrote:
>
>> diff --git a/Makefile.target b/Makefile.target
>> index 417f23e..c518103 100644
>> --- a/Makefile.target
>> +++ b/Makefile.target
>> @@ -208,6 +208,8 @@ obj-$(CONFIG_NO_XEN) += xen-stub.o
>>
>> obj-i386-$(CONFIG_XEN) += xen_platform.o
>>
>> +# Xen PCI Passthrough
>> +
>
> why?
To reserve a space for futur addition. So on the next patch, I'll just
add the object to compile and not this comment.
And why not ?
--
Anthony PERARD
^ permalink raw reply
* [xen-unstable bisection] complete test-i386-i386-pair
From: xen.org @ 2011-10-24 14:02 UTC (permalink / raw)
To: xen-devel; +Cc: ian.jackson, keir, stefano.stabellini
branch xen-unstable
xen branch xen-unstable
job test-i386-i386-pair
test leak-check/check/dst_host
Tree: linux git://github.com/jsgf/linux-xen.git
Tree: qemu git://hg.uk.xensource.com/HG/qemu-xen-unstable.git
Tree: xen http://xenbits.xen.org/staging/xen-unstable.hg
*** Found and reproduced problem changeset ***
Bug is in tree: xen http://xenbits.xen.org/staging/xen-unstable.hg
Bug introduced: 1c8789852eaf
Bug not present: 8269826353d8
changeset: 23990:1c8789852eaf
user: Jan Beulich <jbeulich@suse.com>
date: Fri Oct 21 09:44:47 2011 +0200
x86/hpet: allocate CPU masks dynamically
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
For bisection revision-tuple graph see:
http://www.chiark.greenend.org.uk/~xensrcts/results/bisect.xen-unstable.test-i386-i386-pair.leak-check--check--dst_host.html
Revision IDs in each graph node refer, respectively, to the Trees above.
----------------------------------------
Searching for failure / basis pass:
9471 fail [dst_host=field-cricket,src_host=bush-cricket] / 9355 ok.
Failure / basis pass flights: 9471 / 9355
Tree: linux git://github.com/jsgf/linux-xen.git
Tree: qemu git://hg.uk.xensource.com/HG/qemu-xen-unstable.git
Tree: xen http://xenbits.xen.org/staging/xen-unstable.hg
Latest 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 a7ccbc79fc17
Basis pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 6c583d35d76d
Generating revisions with ./adhoc-revtuple-generator git://github.com/jsgf/linux-xen.git#6bec8b4a4c14095d0b7ce424db9d583c3decae6c-6bec8b4a4c14095d0b7ce424db9d583c3decae6c git://hg.uk.xensource.com/HG/qemu-xen-unstable.git#25378e0a76b282127e9ab8933a4defbc91db3862-25378e0a76b282127e9ab8933a4defbc91db3862 http://xenbits.xen.org/staging/xen-unstable.hg#6c583d35d76d-a7ccbc79fc17
pulling from ssh://xen@xenbits.xen.org/HG/staging/xen-unstable.hg
searching for changes
no changes found
pulling from ssh://xen@xenbits.xen.org/HG/staging/xen-unstable.hg
searching for changes
no changes found
Loaded 74 nodes in revision graph
Searching for test results:
9355 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 6c583d35d76d
9363 fail 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 a7ccbc79fc17
9390 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 6c583d35d76d
9391 fail 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 a7ccbc79fc17
9392 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 253073b522f8
9471 fail 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 a7ccbc79fc17
9472 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 53528bab2eb4
9554 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 8269826353d8
9587 fail 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 1c8789852eaf
9588 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 8269826353d8
9589 fail 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 1c8789852eaf
9590 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 8269826353d8
9591 fail 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 1c8789852eaf
Searching for interesting versions
Result found: flight 9355 (pass), for basis pass
Result found: flight 9363 (fail), for basis failure
Repro found: flight 9390 (pass), for basis pass
Repro found: flight 9391 (fail), for basis failure
0 revisions at 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 8269826353d8
No revisions left to test, checking graph state.
Result found: flight 9554 (pass), for last pass
Result found: flight 9587 (fail), for first failure
Repro found: flight 9588 (pass), for last pass
Repro found: flight 9589 (fail), for first failure
Repro found: flight 9590 (pass), for last pass
Repro found: flight 9591 (fail), for first failure
*** Found and reproduced problem changeset ***
Bug is in tree: xen http://xenbits.xen.org/staging/xen-unstable.hg
Bug introduced: 1c8789852eaf
Bug not present: 8269826353d8
pulling from ssh://xen@xenbits.xen.org/HG/staging/xen-unstable.hg
searching for changes
no changes found
changeset: 23990:1c8789852eaf
user: Jan Beulich <jbeulich@suse.com>
date: Fri Oct 21 09:44:47 2011 +0200
x86/hpet: allocate CPU masks dynamically
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Revision graph left in /home/xc_osstest/results/bisect.xen-unstable.test-i386-i386-pair.leak-check--check--dst_host.{dot,ps,png,html}.
No revision to test.
^ permalink raw reply
* Re: [PATCH 03/11] powerpc/85xx: Rework PCI nodes on P1020RDB
From: Kumar Gala @ 2011-10-24 14:02 UTC (permalink / raw)
To: Tabi Timur-B04825; +Cc: linuxppc-dev@ozlabs.org
In-Reply-To: <CAOZdJXUy5qDhbEAih2kx91fmgyxqd7u9T6AV4fDvp4AMMRA+4w@mail.gmail.com>
On Oct 23, 2011, at 9:37 AM, Tabi Timur-B04825 wrote:
> On Sat, Oct 22, 2011 at 4:20 PM, Kumar Gala =
<galak@kernel.crashing.org> wrote:
>> * Move SoC specific details like irq mapping to SoC dtsi
>> * Update interrupt property to cover both error interrupt and PCIe
>> runtime interrupts
>=20
> Are we going to be doing this for all our device trees? If so, then I
> think we need to document what properties the board dts should be
> defining when it includes a node from a dtsi. Something like this:
Yes, I intend we do this as much as possible.
> dtsi:
> pcie@0 {
> /* dts should define 'reg' and 'ranges' */
> reg =3D <0 0 0 0 0>;
> #interrupt-cells =3D <1>;
>=20
> I suppose it's obvious that 'reg' and 'ranges' should be defined, so
> this isn't the best example. But we should document if any other
> properties should be defined.
>=20
> For example, the SSI nodes contain a bunch of SOC- and board-specific
> properties.
I would have hoped the bindings had made it clear already what was board =
info vs what was SoC.
If not, they should be clarify that in the binding specs.
- k=
^ permalink raw reply
* dec behavior question
From: Kumar Gala @ 2011-10-24 14:01 UTC (permalink / raw)
To: David Gibson; +Cc: devicetree-discuss
If I have something like:
---------------------------------------
spi.dtsi:
&spi0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,mpc8536-espi";
reg = <0x7000 0x1000>;
interrupts = <59 0x2 0 0>;
};
---------------------------------------
foo.dts:
spi0: spi@f00bar {
compatible = "FOOBAR";
};
/include/ "spi.dtsi"
---------------------------------------
What do you expect the resulting dtb to look like w/regards to the compatible node?
- k
^ permalink raw reply
* [xen-unstable bisection] complete test-i386-i386-pair
From: xen.org @ 2011-10-24 14:00 UTC (permalink / raw)
To: xen-devel; +Cc: ian.jackson, keir, stefano.stabellini
branch xen-unstable
xen branch xen-unstable
job test-i386-i386-pair
test leak-check/check/src_host
Tree: linux git://github.com/jsgf/linux-xen.git
Tree: qemu git://hg.uk.xensource.com/HG/qemu-xen-unstable.git
Tree: xen http://xenbits.xen.org/staging/xen-unstable.hg
*** Found and reproduced problem changeset ***
Bug is in tree: xen http://xenbits.xen.org/staging/xen-unstable.hg
Bug introduced: 1c8789852eaf
Bug not present: 8269826353d8
changeset: 23990:1c8789852eaf
user: Jan Beulich <jbeulich@suse.com>
date: Fri Oct 21 09:44:47 2011 +0200
x86/hpet: allocate CPU masks dynamically
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
For bisection revision-tuple graph see:
http://www.chiark.greenend.org.uk/~xensrcts/results/bisect.xen-unstable.test-i386-i386-pair.leak-check--check--src_host.html
Revision IDs in each graph node refer, respectively, to the Trees above.
----------------------------------------
Searching for failure / basis pass:
9471 fail [dst_host=field-cricket,src_host=bush-cricket] / 9355 ok.
Failure / basis pass flights: 9471 / 9355
Tree: linux git://github.com/jsgf/linux-xen.git
Tree: qemu git://hg.uk.xensource.com/HG/qemu-xen-unstable.git
Tree: xen http://xenbits.xen.org/staging/xen-unstable.hg
Latest 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 a7ccbc79fc17
Basis pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 6c583d35d76d
Generating revisions with ./adhoc-revtuple-generator git://github.com/jsgf/linux-xen.git#6bec8b4a4c14095d0b7ce424db9d583c3decae6c-6bec8b4a4c14095d0b7ce424db9d583c3decae6c git://hg.uk.xensource.com/HG/qemu-xen-unstable.git#25378e0a76b282127e9ab8933a4defbc91db3862-25378e0a76b282127e9ab8933a4defbc91db3862 http://xenbits.xen.org/staging/xen-unstable.hg#6c583d35d76d-a7ccbc79fc17
pulling from ssh://xen@xenbits.xen.org/HG/staging/xen-unstable.hg
searching for changes
no changes found
pulling from ssh://xen@xenbits.xen.org/HG/staging/xen-unstable.hg
searching for changes
no changes found
Loaded 74 nodes in revision graph
Searching for test results:
9355 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 6c583d35d76d
9363 fail 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 a7ccbc79fc17
9390 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 6c583d35d76d
9391 fail 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 a7ccbc79fc17
9392 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 253073b522f8
9471 fail 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 a7ccbc79fc17
9472 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 53528bab2eb4
9554 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 8269826353d8
9587 fail 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 1c8789852eaf
9588 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 8269826353d8
9589 fail 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 1c8789852eaf
9590 pass 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 8269826353d8
9591 fail 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 1c8789852eaf
Searching for interesting versions
Result found: flight 9355 (pass), for basis pass
Result found: flight 9363 (fail), for basis failure
Repro found: flight 9390 (pass), for basis pass
Repro found: flight 9391 (fail), for basis failure
0 revisions at 6bec8b4a4c14095d0b7ce424db9d583c3decae6c 25378e0a76b282127e9ab8933a4defbc91db3862 8269826353d8
No revisions left to test, checking graph state.
Result found: flight 9554 (pass), for last pass
Result found: flight 9587 (fail), for first failure
Repro found: flight 9588 (pass), for last pass
Repro found: flight 9589 (fail), for first failure
Repro found: flight 9590 (pass), for last pass
Repro found: flight 9591 (fail), for first failure
*** Found and reproduced problem changeset ***
Bug is in tree: xen http://xenbits.xen.org/staging/xen-unstable.hg
Bug introduced: 1c8789852eaf
Bug not present: 8269826353d8
pulling from ssh://xen@xenbits.xen.org/HG/staging/xen-unstable.hg
searching for changes
no changes found
changeset: 23990:1c8789852eaf
user: Jan Beulich <jbeulich@suse.com>
date: Fri Oct 21 09:44:47 2011 +0200
x86/hpet: allocate CPU masks dynamically
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Revision graph left in /home/xc_osstest/results/bisect.xen-unstable.test-i386-i386-pair.leak-check--check--src_host.{dot,ps,png,html}.
----------------------------------------
9591: trouble: broken
flight 9591 xen-unstable real-bisect [real]
http://www.chiark.greenend.org.uk/~xensrcts/logs/9591/
jobs:
test-i386-i386-pair broken
------------------------------------------------------------
sg-report-flight on woking.cam.xci-test.com
logs: /home/xc_osstest/logs
images: /home/xc_osstest/images
Logs, config files, etc. are available at
http://www.chiark.greenend.org.uk/~xensrcts/logs
Test harness code can be found at
http://xenbits.xensource.com/gitweb?p=osstest.git;a=summary
^ permalink raw reply
* Re: [PATCH] module,bug: Add TAINT_OOT_MODULE flag for modules not built in-tree
From: Dave Jones @ 2011-10-24 13:58 UTC (permalink / raw)
To: Ben Hutchings; +Cc: LKML, Greg KH, Debian kernel maintainers, Rusty Russell
In-Reply-To: <1319461948.31243.31.camel@deadeye>
On Mon, Oct 24, 2011 at 03:12:28PM +0200, Ben Hutchings wrote:
> Use of the GPL or a compatible licence doesn't necessarily make the code
> any good. We already consider staging modules to be suspect, and this
> should also be true for out-of-tree modules which may receive very
> little review.
>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> Debian has been carrying this for the last few kernel versions. The
> recent thread '[RFC] virtualbox tainting.' and discussions at KS suggest
> that this might be more generally useful.
Looks good to me.
Reviewed-by: Dave Jones <davej@redhat.com>
^ permalink raw reply
* Re: [PATCH v2 3/5] regulator: helper routine to extract regulator_init_data
From: Grant Likely @ 2011-10-24 13:59 UTC (permalink / raw)
To: Shawn Guo
Cc: Mark Brown, Rajendra Nayak, patches, tony, devicetree-discuss,
linux-kernel, linux-omap, lrg, linux-arm-kernel
In-Reply-To: <20111024134025.GE1755@S2100-06.ap.freescale.net>
On Mon, Oct 24, 2011 at 09:40:26PM +0800, Shawn Guo wrote:
> On Mon, Oct 24, 2011 at 03:06:37PM +0200, Mark Brown wrote:
> > On Mon, Oct 24, 2011 at 09:04:31PM +0800, Shawn Guo wrote:
> >
> > > If we can attach the device_node of 'regulators' node to dev->of_node
> > > when calling regulator_register(regulator_desc, dev, ...) from
> > > regulator driver, the regulator core will be able to find all nodes under
> > > 'regulators' using for_each_child_of_node(dev->of_node, child).
> >
> > Please provide concrete examples of the bindings you're talking about,
> > the really important thing here is how sane the bindings look and I've
> > really got no idea what any of what you're talking about will look like
> > or if they make sense.
> >
> The only thing different from what I attached last time is the
> compatible string added to 'regulators' node.
>
> ecspi@70010000 { /* ECSPI1 */
> fsl,spi-num-chipselects = <2>;
> cs-gpios = <&gpio3 24 0>, /* GPIO4_24 */
> <&gpio3 25 0>; /* GPIO4_25 */
> status = "okay";
>
> pmic: mc13892@0 {
> #address-cells = <1>;
> #size-cells = <0>;
> compatible = "fsl,mc13892";
> spi-max-frequency = <6000000>;
> reg = <0>;
> mc13xxx-irq-gpios = <&gpio0 8 0>; /* GPIO1_8 */
>
> regulators {
> compatible = "fsl,mc13892-regulator";
>
> sw1reg: mc13892_sw1 {
> regulator-min-uV = <600000>;
> regulator-max-uV = <1375000>;
> regulator-change-voltage;
> regulator-boot-on;
> regulator-always-on;
> };
>
> sw2reg: mc13892_sw2 {
> regulator-min-uV = <900000>;
> regulator-max-uV = <1850000>;
> regulator-change-voltage;
> regulator-boot-on;
> regulator-always-on;
> };
>
> ......
> };
>
> leds {
> ......
> };
>
> buttons {
> ......
> };
> };
>
> flash: at45db321d@1 {
> ......
> };
> };
>
> > > hesitate to hack this into mfd_add_devices(), so I would like to add
> > > compatible string "fsl,mc13892-regulators" to node 'regulators' and
> > > find the node using of_find_compatible_node(dev->parent, NULL,
> > > "fsl,mc13892-regulators").
> >
> > It's not immediately obvious to me that having a binding for the
> > regulators separately makes sense, it's not a usefully distinct device.
> >
> Fair point. Actually, I also hate to have the finding of node
> 'regulators' plugged into regulator driver. What about following
> change to address Grant's concern on global device tree search?
>
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index 8fe132d..29dcf90 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -2673,7 +2673,8 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
> BLOCKING_INIT_NOTIFIER_HEAD(&rdev->notifier);
>
> /* find device_node and attach it */
> - rdev->dev.of_node = of_find_node_by_name(NULL, regulator_desc->name);
> + rdev->dev.of_node = of_find_node_by_name(dev->parent->of_node,
> + regulator_desc->name);
of_find_node_by_name() doesn't work that way. The first argument is a
starting point, but it doesn't restrict the search to children of a
node.
for_each_child_of_node() is what you want to use when iterating over
the children which unfortunately changes the structure of this
function.
g.
^ permalink raw reply
* [PATCH v2 3/5] regulator: helper routine to extract regulator_init_data
From: Grant Likely @ 2011-10-24 13:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20111024134025.GE1755@S2100-06.ap.freescale.net>
On Mon, Oct 24, 2011 at 09:40:26PM +0800, Shawn Guo wrote:
> On Mon, Oct 24, 2011 at 03:06:37PM +0200, Mark Brown wrote:
> > On Mon, Oct 24, 2011 at 09:04:31PM +0800, Shawn Guo wrote:
> >
> > > If we can attach the device_node of 'regulators' node to dev->of_node
> > > when calling regulator_register(regulator_desc, dev, ...) from
> > > regulator driver, the regulator core will be able to find all nodes under
> > > 'regulators' using for_each_child_of_node(dev->of_node, child).
> >
> > Please provide concrete examples of the bindings you're talking about,
> > the really important thing here is how sane the bindings look and I've
> > really got no idea what any of what you're talking about will look like
> > or if they make sense.
> >
> The only thing different from what I attached last time is the
> compatible string added to 'regulators' node.
>
> ecspi at 70010000 { /* ECSPI1 */
> fsl,spi-num-chipselects = <2>;
> cs-gpios = <&gpio3 24 0>, /* GPIO4_24 */
> <&gpio3 25 0>; /* GPIO4_25 */
> status = "okay";
>
> pmic: mc13892 at 0 {
> #address-cells = <1>;
> #size-cells = <0>;
> compatible = "fsl,mc13892";
> spi-max-frequency = <6000000>;
> reg = <0>;
> mc13xxx-irq-gpios = <&gpio0 8 0>; /* GPIO1_8 */
>
> regulators {
> compatible = "fsl,mc13892-regulator";
>
> sw1reg: mc13892_sw1 {
> regulator-min-uV = <600000>;
> regulator-max-uV = <1375000>;
> regulator-change-voltage;
> regulator-boot-on;
> regulator-always-on;
> };
>
> sw2reg: mc13892_sw2 {
> regulator-min-uV = <900000>;
> regulator-max-uV = <1850000>;
> regulator-change-voltage;
> regulator-boot-on;
> regulator-always-on;
> };
>
> ......
> };
>
> leds {
> ......
> };
>
> buttons {
> ......
> };
> };
>
> flash: at45db321d at 1 {
> ......
> };
> };
>
> > > hesitate to hack this into mfd_add_devices(), so I would like to add
> > > compatible string "fsl,mc13892-regulators" to node 'regulators' and
> > > find the node using of_find_compatible_node(dev->parent, NULL,
> > > "fsl,mc13892-regulators").
> >
> > It's not immediately obvious to me that having a binding for the
> > regulators separately makes sense, it's not a usefully distinct device.
> >
> Fair point. Actually, I also hate to have the finding of node
> 'regulators' plugged into regulator driver. What about following
> change to address Grant's concern on global device tree search?
>
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index 8fe132d..29dcf90 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -2673,7 +2673,8 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
> BLOCKING_INIT_NOTIFIER_HEAD(&rdev->notifier);
>
> /* find device_node and attach it */
> - rdev->dev.of_node = of_find_node_by_name(NULL, regulator_desc->name);
> + rdev->dev.of_node = of_find_node_by_name(dev->parent->of_node,
> + regulator_desc->name);
of_find_node_by_name() doesn't work that way. The first argument is a
starting point, but it doesn't restrict the search to children of a
node.
for_each_child_of_node() is what you want to use when iterating over
the children which unfortunately changes the structure of this
function.
g.
^ permalink raw reply
* Re: [PATCH v2 3/5] regulator: helper routine to extract regulator_init_data
From: Grant Likely @ 2011-10-24 13:59 UTC (permalink / raw)
To: Shawn Guo
Cc: Rajendra Nayak, patches, tony, devicetree-discuss, Mark Brown,
linux-kernel, linux-omap, lrg, linux-arm-kernel
In-Reply-To: <20111024134025.GE1755@S2100-06.ap.freescale.net>
On Mon, Oct 24, 2011 at 09:40:26PM +0800, Shawn Guo wrote:
> On Mon, Oct 24, 2011 at 03:06:37PM +0200, Mark Brown wrote:
> > On Mon, Oct 24, 2011 at 09:04:31PM +0800, Shawn Guo wrote:
> >
> > > If we can attach the device_node of 'regulators' node to dev->of_node
> > > when calling regulator_register(regulator_desc, dev, ...) from
> > > regulator driver, the regulator core will be able to find all nodes under
> > > 'regulators' using for_each_child_of_node(dev->of_node, child).
> >
> > Please provide concrete examples of the bindings you're talking about,
> > the really important thing here is how sane the bindings look and I've
> > really got no idea what any of what you're talking about will look like
> > or if they make sense.
> >
> The only thing different from what I attached last time is the
> compatible string added to 'regulators' node.
>
> ecspi@70010000 { /* ECSPI1 */
> fsl,spi-num-chipselects = <2>;
> cs-gpios = <&gpio3 24 0>, /* GPIO4_24 */
> <&gpio3 25 0>; /* GPIO4_25 */
> status = "okay";
>
> pmic: mc13892@0 {
> #address-cells = <1>;
> #size-cells = <0>;
> compatible = "fsl,mc13892";
> spi-max-frequency = <6000000>;
> reg = <0>;
> mc13xxx-irq-gpios = <&gpio0 8 0>; /* GPIO1_8 */
>
> regulators {
> compatible = "fsl,mc13892-regulator";
>
> sw1reg: mc13892_sw1 {
> regulator-min-uV = <600000>;
> regulator-max-uV = <1375000>;
> regulator-change-voltage;
> regulator-boot-on;
> regulator-always-on;
> };
>
> sw2reg: mc13892_sw2 {
> regulator-min-uV = <900000>;
> regulator-max-uV = <1850000>;
> regulator-change-voltage;
> regulator-boot-on;
> regulator-always-on;
> };
>
> ......
> };
>
> leds {
> ......
> };
>
> buttons {
> ......
> };
> };
>
> flash: at45db321d@1 {
> ......
> };
> };
>
> > > hesitate to hack this into mfd_add_devices(), so I would like to add
> > > compatible string "fsl,mc13892-regulators" to node 'regulators' and
> > > find the node using of_find_compatible_node(dev->parent, NULL,
> > > "fsl,mc13892-regulators").
> >
> > It's not immediately obvious to me that having a binding for the
> > regulators separately makes sense, it's not a usefully distinct device.
> >
> Fair point. Actually, I also hate to have the finding of node
> 'regulators' plugged into regulator driver. What about following
> change to address Grant's concern on global device tree search?
>
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index 8fe132d..29dcf90 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -2673,7 +2673,8 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
> BLOCKING_INIT_NOTIFIER_HEAD(&rdev->notifier);
>
> /* find device_node and attach it */
> - rdev->dev.of_node = of_find_node_by_name(NULL, regulator_desc->name);
> + rdev->dev.of_node = of_find_node_by_name(dev->parent->of_node,
> + regulator_desc->name);
of_find_node_by_name() doesn't work that way. The first argument is a
starting point, but it doesn't restrict the search to children of a
node.
for_each_child_of_node() is what you want to use when iterating over
the children which unfortunately changes the structure of this
function.
g.
^ permalink raw reply
* [U-Boot] [PATCH] image: Allow images to indicate they're loadable at any address
From: Stephen Warren @ 2011-10-24 13:59 UTC (permalink / raw)
To: u-boot
The legacy uImage format includes an absolute load and entry-
point address. When presented with a uImage in memory that
isn't loaded at the address in the image's load address,
U-Boot will relocate the image to its address in the header.
Some payloads can actually be loaded and used at any arbitrary
address. An example is an ARM Linux kernel zImage file. This
is useful when sharing a single zImage across multiple boards
with different memory layouts, or U-Boot builds with different
${load_addr} since sharing a single absolute load address may
not be possible.
With this config option enabled, an image header may contain a
load address of -1/0xffffffff. This indicates the image can
operate at any load address, and U-Boot will avoid automtically
copying it anywhere. In this case, the entry-point field is
specified relative to the start of the image payload.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
Wolfgang,
This is an much simpler and less invasive alternative to my previous
IH_TYPE_KERNEL_REL patch. If it's OK, you can ignore that patch.
u-boot.bin sizes for Tegra Seaboard without/with this config option on:
text data bss dec hex filename
165858 3565 217016 386439 5e587 ./u-boot
with:
text data bss dec hex filename
165950 3565 217012 386527 5e5df ./u-boot
README | 23 +++++++++++++++++++++++
common/cmd_bootm.c | 4 ++++
common/image.c | 27 +++++++++++++++++++++++++++
include/image.h | 4 ++++
4 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/README b/README
index eb9ade9..480cfe3 100644
--- a/README
+++ b/README
@@ -3177,6 +3177,29 @@ Low Level (hardware related) configuration options:
be used if available. These functions may be faster under some
conditions but may increase the binary size.
+Image-related options:
+---------------------------------------------------
+
+- CONFIG_SYS_RELOCATABLE_IMAGES
+
+ The legacy uImage format includes an absolute load and entry-
+ point address. When presented with a uImage in memory that
+ isn't loaded at the address in the image's load address,
+ U-Boot will relocate the image to its address in the header.
+
+ Some payloads can actually be loaded and used at any arbitrary
+ address. An example is an ARM Linux kernel zImage file. This
+ is useful when sharing a single zImage across multiple boards
+ with different memory layouts, or U-Boot builds with different
+ ${load_addr} since sharing a single absolute load address may
+ not be possible.
+
+ With this config option enabled, an image header may contain a
+ load address of -1/0xffffffff. This indicates the image can
+ operate at any load address, and U-Boot will avoid automtically
+ copying it anywhere. In this case, the entry-point field is
+ specified relative to the start of the image payload.
+
Building the Software:
======================
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index bb9b698..de08bbc 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -730,6 +730,10 @@ static image_header_t *image_get_kernel (ulong img_addr, int verify)
return NULL;
}
+#ifdef CONFIG_SYS_RELOCATABLE_IMAGES
+ image_fixup_load_entry(hdr);
+#endif
+
show_boot_progress (3);
image_print_contents (hdr);
diff --git a/common/image.c b/common/image.c
index 32ad4da..a746c6f 100644
--- a/common/image.c
+++ b/common/image.c
@@ -342,6 +342,25 @@ void image_print_contents (const void *ptr)
}
}
+#ifdef CONFIG_SYS_RELOCATABLE_IMAGES
+void image_fixup_load_entry(image_header_t *hdr)
+{
+ ulong load;
+ ulong hsize;
+ ulong ep;
+
+ load = image_get_load(hdr);
+ if (load != -1)
+ return;
+
+ load = (ulong)hdr;
+ hsize = image_get_header_size();
+ ep = load + hsize + image_get_ep(hdr);
+
+ image_set_load(hdr, load);
+ image_set_ep(hdr, ep);
+}
+#endif
#ifndef USE_HOSTCC
/**
@@ -379,6 +398,10 @@ static const image_header_t *image_get_ramdisk (ulong rd_addr, uint8_t arch,
return NULL;
}
+#ifdef CONFIG_SYS_RELOCATABLE_IMAGES
+ image_fixup_load_entry((image_header_t *)rd_hdr);
+#endif
+
show_boot_progress (10);
image_print_contents (rd_hdr);
@@ -1116,6 +1139,10 @@ static const image_header_t *image_get_fdt (ulong fdt_addr)
}
puts ("OK\n");
+#ifdef CONFIG_SYS_RELOCATABLE_IMAGES
+ image_fixup_load_entry((image_header_t *)fdt_hdr);
+#endif
+
if (!image_check_type (fdt_hdr, IH_TYPE_FLATDT)) {
fdt_error ("uImage is not a fdt");
return NULL;
diff --git a/include/image.h b/include/image.h
index b7caaa6..c680f1f 100644
--- a/include/image.h
+++ b/include/image.h
@@ -332,6 +332,10 @@ int genimg_get_format (void *img_addr);
int genimg_has_config (bootm_headers_t *images);
ulong genimg_get_image (ulong img_addr);
+#ifdef CONFIG_SYS_RELOCATABLE_IMAGES
+void image_fixup_load_entry(image_header_t *hdr);
+#endif
+
int boot_get_ramdisk (int argc, char * const argv[], bootm_headers_t *images,
uint8_t arch, ulong *rd_start, ulong *rd_end);
--
1.7.4.1
^ permalink raw reply related
* RE: how stable are snapshots at the block level?
From: Edward Ned Harvey @ 2011-10-24 13:59 UTC (permalink / raw)
To: 'Mathijs Kwik'; +Cc: linux-btrfs
In-Reply-To: <CAKvOHKCjxxKTahivOuRBPBB89JBrTwndQ6cCEuFaPbJr8PYtpA@mail.gmail.com>
> From: Mathijs Kwik [mailto:mathijs@bluescreen303.nl]
> Sent: Sunday, October 23, 2011 11:20 AM
>
> > Also if you're rsyncing the block level device, you're running underneath
> btrfs and losing any checksumming benefit that btrfs was giving you, so
> you're possibly introducing risk for silent data corruption. (Or more
> accurately, failing to allow btrfs to detect/correct it.)
>
> Not sure... I'm sure that's the case for in-use subvolumes, but
> shouldn't snapshots (and their metadata/checksums) just be safe?
Nope. The whole point of checksumming is like this: All devices are imperfect. They have built-in error detection and correction. Whenever an error occurs (which is often) the drive tries to silently correct it (reread) without telling the OS. But the checksumming in hardware is rather weak. Sometimes you'll get corrupt data that passes the hardware test and reaches the OS without any clue that it's wrong. I find that a typical small business fileserver (10 sata disks) hits these approx once a year.
Filesystem checksumming is much stronger (lower probability to silently allow an error). Like randomly selecting a single molecule twice consecutively amongst all the molecules in the solar system. Like much less likely to occur than the end of the human race, etc. So when the silent errors occur, filesystem checksumming definitely detects it, and if possible, corrects it.
If you are reading the raw device underneath btrfs, you are not getting the benefit of the filesystem checksumming. If you encounter an undetected read/write error, it will silently pass. Your data will be corrupted, you'll never know about it until you see the side-effects (whatever they may be).
While people with computers have accepted this level of unreliability for years (fat32, ntfs, ext3/4, etc) people are now beginning to recognize the importance on a greater scale. Once corrupted, always corrupted. People want to keep their data indefinitely.
> Thanks for your advice,
> Like I said, for me, right now, sticking to tried-and-tested
> file-based rsync is just ok. But I hope to get some insights into
> other possibilities. btrfs send sounds cool, but I sure hope this is
> not the only solution, as I described a few scenarios where
> block-level copies have advantages.
There is never a situation where block level copies have any advantage over something like btrfs send. Except perhaps forensics or espionage. But in terms of fast efficient reliable backups, btrfs send has every advantage and no disadvantage compared to block level copy.
There are many situations where btrfs send has an advantage over both block level and file level copies. It instantly knows all the relevant disk blocks to send, it preserves every property, it's agnostic about filesystem size or layout on either sending or receiving end, you have the option to create different configurations on each side, including compression etc. And so on.
^ permalink raw reply
* [Buildroot] Call For Participation: buildroot + crosstool-NG Developpers' Day
From: Mike Frysinger @ 2011-10-24 13:59 UTC (permalink / raw)
To: buildroot
In-Reply-To: <201108151803.02636.yann.morin.1998@anciens.enib.fr>
i'm leaving sat morn, but i'd like to meet up with you guys at some
point if only to say "hi" :)
-mike
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.