[OpenWrt-Devel] [PATCH 1/3] ar71xx: add GPIO based S/W I2C master
From: Miaoqing Pan Signed-off-by: Miaoqing Pan --- .../linux/ar71xx/files/arch/mips/ath79/dev-i2c.c | 33 ++ .../linux/ar71xx/files/arch/mips/ath79/dev-i2c.h | 24 ...915-MIPS-ath79-add-gpio-based-i2c-support.patch | 22 +++ 3 files changed, 79 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/dev-i2c.c create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/dev-i2c.h create mode 100644 target/linux/ar71xx/patches-3.18/915-MIPS-ath79-add-gpio-based-i2c-support.patch diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-i2c.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-i2c.c new file mode 100644 index 000..2e0a5dd --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-i2c.c @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2015 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include + +static struct platform_device ath79_i2c_gpio_device = { + .name = "i2c-gpio", + .id = 0, +}; + +void __init ath79_register_i2c(struct i2c_gpio_platform_data *pdata, + struct i2c_board_info const *info, + unsigned int n) +{ + i2c_register_board_info(0, info, n); + ath79_i2c_gpio_device.dev.platform_data = pdata; + platform_device_register(&ath79_i2c_gpio_device); +} diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-i2c.h b/target/linux/ar71xx/files/arch/mips/ath79/dev-i2c.h new file mode 100644 index 000..9b837bb --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-i2c.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2015 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _ATH79_DEV_I2C_H_ +#define _ATH79_DEV_I2C_H_ + +void ath79_register_i2c(struct i2c_gpio_platform_data *pdata, + struct i2c_board_info const *info, + unsigned int n); + +#endif /* _ATH79_DEV_I2C_H_ */ diff --git a/target/linux/ar71xx/patches-3.18/915-MIPS-ath79-add-gpio-based-i2c-support.patch b/target/linux/ar71xx/patches-3.18/915-MIPS-ath79-add-gpio-based-i2c-support.patch new file mode 100644 index 000..a8126fe --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/915-MIPS-ath79-add-gpio-based-i2c-support.patch @@ -0,0 +1,22 @@ +--- a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig +@@ -1339,6 +1339,9 @@ config ATH79_DEV_NFC + config ATH79_DEV_SPI + def_bool n + ++config ATH79_DEV_I2C ++ def_bool n ++ + config ATH79_DEV_USB + def_bool n + +--- a/arch/mips/ath79/Makefile b/arch/mips/ath79/Makefile +@@ -25,6 +25,7 @@ obj-$(CONFIG_ATH79_DEV_LEDS_GPIO)+= dev-leds-gpio.o + obj-$(CONFIG_ATH79_DEV_M25P80)+= dev-m25p80.o + obj-$(CONFIG_ATH79_DEV_NFC) += dev-nfc.o + obj-$(CONFIG_ATH79_DEV_SPI) += dev-spi.o ++obj-$(CONFIG_ATH79_DEV_I2C) += dev-i2c.o + obj-$(CONFIG_ATH79_DEV_USB) += dev-usb.o + obj-$(CONFIG_ATH79_DEV_WMAC) += dev-wmac.o + -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/3] ar71xx: add support for the Giga Device spi nand chips
From: Miaoqing Pan Signed-off-by: Miaoqing Pan --- ...PS-ath79-add-giga-device-spi-nand-support.patch | 40 ++ 1 file changed, 40 insertions(+) create mode 100644 target/linux/ar71xx/patches-3.18/916-MIPS-ath79-add-giga-device-spi-nand-support.patch diff --git a/target/linux/ar71xx/patches-3.18/916-MIPS-ath79-add-giga-device-spi-nand-support.patch b/target/linux/ar71xx/patches-3.18/916-MIPS-ath79-add-giga-device-spi-nand-support.patch new file mode 100644 index 000..ff366cc --- /dev/null +++ b/target/linux/ar71xx/patches-3.18/916-MIPS-ath79-add-giga-device-spi-nand-support.patch @@ -0,0 +1,40 @@ +--- a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c +@@ -51,6 +51,19 @@ struct nand_flash_dev nand_flash_ids[] = { + SZ_8K, SZ_8K, SZ_2M, 0, 6, 640, NAND_ECC_INFO(40, SZ_1K), + 4 }, + ++ {"GD5F1GQ4U 1G 3.3V 8-bit", ++ { .id = {0xc8, 0xb1} }, ++SZ_2K, SZ_128, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) }, ++ {"GD5F2GQ4U 2G 3.3V 8-bit", ++ { .id = {0xc8, 0xb2} }, ++SZ_2K, SZ_256, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) }, ++ {"GD5F1GQ4R 1G 1.8V 8-bit", ++ { .id = {0xc8, 0xa1} }, ++SZ_2K, SZ_128, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) }, ++ {"GD5F2GQ4R 2G 1.8V 8-bit", ++ { .id = {0xc8, 0xa2} }, ++SZ_2K, SZ_256, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) }, ++ + LEGACY_ID_NAND("NAND 4MiB 5V 8-bit", 0x6B, 4, SZ_8K, SP_OPTIONS), + LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE3, 4, SZ_8K, SP_OPTIONS), + LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE5, 4, SZ_8K, SP_OPTIONS), +@@ -178,6 +191,7 @@ struct nand_manufacturers nand_manuf_ids[] = { + {NAND_MFR_EON, "Eon"}, + {NAND_MFR_SANDISK, "SanDisk"}, + {NAND_MFR_INTEL, "Intel"}, ++ {NAND_MFR_GIGADEVICE, "Giga Device"}, + {0x0, "Unknown"} + }; + +--- a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h +@@ -720,6 +720,7 @@ struct nand_chip { + #define NAND_MFR_MICRON 0x2c + #define NAND_MFR_AMD 0x01 + #define NAND_MFR_MACRONIX 0xc2 ++#define NAND_MFR_GIGADEVICE 0xc8 + #define NAND_MFR_EON 0x92 + #define NAND_MFR_SANDISK 0x45 + #define NAND_MFR_INTEL0x89 -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/3] ar71xx: add spi nand driver support
From: Miaoqing Pan Derived from 'drivers/staging/mt29f_spinand'. Only support Giga Device SPI NAND device now, - GD5F1GQ4U 1G 3.3V 8-bit - GD5F2GQ4U 2G 3.3V 8-bit - GD5F1GQ4R 1G 1.8V 8-bit - GD5F2GQ4R 2G 1.8V 8-bit Signed-off-by: Miaoqing Pan --- .../ar71xx/files/drivers/mtd/nand/ath79_spinand.c | 827 + .../917-MIPS-ath79-add-spi-nand-driver.patch | 21 + 2 files changed, 848 insertions(+) create mode 100644 target/linux/ar71xx/files/drivers/mtd/nand/ath79_spinand.c create mode 100644 target/linux/ar71xx/patches-3.18/917-MIPS-ath79-add-spi-nand-driver.patch diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/ath79_spinand.c b/target/linux/ar71xx/files/drivers/mtd/nand/ath79_spinand.c new file mode 100644 index 000..bcc90f0 --- /dev/null +++ b/target/linux/ar71xx/files/drivers/mtd/nand/ath79_spinand.c @@ -0,0 +1,827 @@ +/* + * Copyright (c) 2015 The Linux Foundation. All rights reserved. + * + * Copyright (c) 2003-2013 Broadcom Corporation + * + * Copyright (c) 2009-2010 Micron Technology, Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* cmd */ +#define CMD_READ 0x13 +#define CMD_READ_RDM 0x03 +#define CMD_PROG_PAGE_LOAD 0x02 +#define CMD_PROG_PAGE 0x84 +#define CMD_PROG_PAGE_EXC 0x10 +#define CMD_ERASE_BLK 0xd8 +#define CMD_WR_ENABLE 0x06 +#define CMD_WR_DISABLE 0x04 +#define CMD_READ_ID0x9f +#define CMD_RESET 0xff +#define CMD_READ_REG 0x0f +#define CMD_WRITE_REG 0x1f + +/* feature/ status reg */ +#define REG_BLOCK_LOCK 0xa0 +#define REG_OTP0xb0 +#define REG_STATUS 0xc0 + +/* status */ +#define STATUS_OIP_MASK0x01 +#define STATUS_READY (0 << 0) +#define STATUS_BUSY(1 << 0) + +#define STATUS_E_FAIL_MASK 0x04 +#define STATUS_E_FAIL (1 << 2) + +#define STATUS_P_FAIL_MASK 0x08 +#define STATUS_P_FAIL (1 << 3) + +#define STATUS_ECC_MASK0x07 +#define STATUS_ECC_ERR_BITS5 0x03 +#define STATUS_ECC_ERR_BITS6 0x04 +#define STATUS_ECC_ERR_BITS7 0x05 +#define STATUS_ECC_ERR_BITS8 0x06 +#define STATUS_ECC_ERROR 0x07 +#define STATUS2ECC(status) (((status) >> 4) & STATUS_ECC_MASK) + +/* ECC/OTP enable defines */ +#define REG_ECC_MASK 0x10 +#define REG_ECC_OFF(0 << 4) +#define REG_ECC_ON (1 << 4) + +#define REG_OTP_EN (1 << 6) +#define REG_OTP_PRT(1 << 7) + +/* block lock */ +#define BL_ALL_UNLOCKED0 + +#define BLOCK_TO_RA(b) ((b) << 6) + +#define BUFSIZE(10 * 64 * 2048) +#define CACHE_BUF 2112 + +struct ath79_spinand_info { + struct spi_device *spi; + void*priv; +}; + +struct ath79_spinand_state { + uint32_tcol; + uint32_trow; + int buf_ptr; + u8 *buf; +}; + +struct ath79_spinand_command { + u8 cmd; + u32 n_addr; /* Number of address */ + u8 addr[3];/* Reg Offset */ + u32 n_dummy;/* Dummy use */ + u32 n_tx; /* Number of tx bytes */ + u8 *tx_buf;/* Tx buf */ + u32 n_rx; /* Number of rx bytes */ + u8 *rx_buf;/* Rx buf */ +}; + +static const struct nand_ecclayout ath79_spinand_oob_128 = { + .eccbytes = 64, + .eccpos = { + 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127}, + .oobfree = { {.offset = 16, .length = 48}, } +}; + +static u8 badblock_pattern
[OpenWrt-Devel] [PATCH][libubox] ustream-fd: handle uloop errors
Otherwise uloop will delete the fd and the ustream will receive no notification of the error. Signed-off-by: Philip Craig --- ustream-fd.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ustream-fd.c b/ustream-fd.c index 5ffca53..2c15b42 100644 --- a/ustream-fd.c +++ b/ustream-fd.c @@ -25,7 +25,7 @@ static void ustream_fd_set_uloop(struct ustream *s, bool write) { struct ustream_fd *sf = container_of(s, struct ustream_fd, stream); struct ustream_buf *buf; - unsigned int flags = ULOOP_EDGE_TRIGGER; + unsigned int flags = ULOOP_EDGE_TRIGGER | ULOOP_ERROR_CB; if (!s->read_blocked && !s->eof) flags |= ULOOP_READ; @@ -127,6 +127,12 @@ static bool __ustream_fd_poll(struct ustream_fd *sf, unsigned int events) ustream_fd_set_uloop(s, false); } + if (sf->fd.error) { + if (!s->write_error) + ustream_state_change(s); + s->write_error = true; + } + return more; } -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 2/3] ar71xx: add support for the Giga Device spi nand chips
Hi, can you first send this patch upstream please ? John On 10/07/2015 09:18, miaoq...@qti.qualcomm.com wrote: > From: Miaoqing Pan > > Signed-off-by: Miaoqing Pan > --- > ...PS-ath79-add-giga-device-spi-nand-support.patch | 40 > ++ > 1 file changed, 40 insertions(+) > create mode 100644 > target/linux/ar71xx/patches-3.18/916-MIPS-ath79-add-giga-device-spi-nand-support.patch > > diff --git > a/target/linux/ar71xx/patches-3.18/916-MIPS-ath79-add-giga-device-spi-nand-support.patch > > b/target/linux/ar71xx/patches-3.18/916-MIPS-ath79-add-giga-device-spi-nand-support.patch > new file mode 100644 > index 000..ff366cc > --- /dev/null > +++ > b/target/linux/ar71xx/patches-3.18/916-MIPS-ath79-add-giga-device-spi-nand-support.patch > @@ -0,0 +1,40 @@ > +--- a/drivers/mtd/nand/nand_ids.c > b/drivers/mtd/nand/nand_ids.c > +@@ -51,6 +51,19 @@ struct nand_flash_dev nand_flash_ids[] = { > + SZ_8K, SZ_8K, SZ_2M, 0, 6, 640, NAND_ECC_INFO(40, SZ_1K), > + 4 }, > + > ++{"GD5F1GQ4U 1G 3.3V 8-bit", > ++{ .id = {0xc8, 0xb1} }, > ++ SZ_2K, SZ_128, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) }, > ++{"GD5F2GQ4U 2G 3.3V 8-bit", > ++{ .id = {0xc8, 0xb2} }, > ++ SZ_2K, SZ_256, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) }, > ++{"GD5F1GQ4R 1G 1.8V 8-bit", > ++{ .id = {0xc8, 0xa1} }, > ++ SZ_2K, SZ_128, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) }, > ++{"GD5F2GQ4R 2G 1.8V 8-bit", > ++{ .id = {0xc8, 0xa2} }, > ++ SZ_2K, SZ_256, SZ_128K, 0, 2, 128, NAND_ECC_INFO(4, SZ_512) }, > ++ > + LEGACY_ID_NAND("NAND 4MiB 5V 8-bit", 0x6B, 4, SZ_8K, SP_OPTIONS), > + LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE3, 4, SZ_8K, SP_OPTIONS), > + LEGACY_ID_NAND("NAND 4MiB 3,3V 8-bit", 0xE5, 4, SZ_8K, SP_OPTIONS), > +@@ -178,6 +191,7 @@ struct nand_manufacturers nand_manuf_ids[] = { > + {NAND_MFR_EON, "Eon"}, > + {NAND_MFR_SANDISK, "SanDisk"}, > + {NAND_MFR_INTEL, "Intel"}, > ++{NAND_MFR_GIGADEVICE, "Giga Device"}, > + {0x0, "Unknown"} > + }; > + > +--- a/include/linux/mtd/nand.h > b/include/linux/mtd/nand.h > +@@ -720,6 +720,7 @@ struct nand_chip { > + #define NAND_MFR_MICRON 0x2c > + #define NAND_MFR_AMD0x01 > + #define NAND_MFR_MACRONIX 0xc2 > ++#define NAND_MFR_GIGADEVICE 0xc8 > + #define NAND_MFR_EON0x92 > + #define NAND_MFR_SANDISK0x45 > + #define NAND_MFR_INTEL 0x89 > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 3/3] ar71xx: add spi nand driver support
Hi, lots of comments inline. please check all you error paths. right now on various places when an error occurs you simply continue as if nothing happened. also move all the dev_err calls into the functions where the error happens. please also review the actual error messages. John On 10/07/2015 09:18, miaoq...@qti.qualcomm.com wrote: > From: Miaoqing Pan > > Derived from 'drivers/staging/mt29f_spinand'. > > Only support Giga Device SPI NAND device now, > - GD5F1GQ4U 1G 3.3V 8-bit > - GD5F2GQ4U 2G 3.3V 8-bit > - GD5F1GQ4R 1G 1.8V 8-bit > - GD5F2GQ4R 2G 1.8V 8-bit > > Signed-off-by: Miaoqing Pan > --- > .../ar71xx/files/drivers/mtd/nand/ath79_spinand.c | 827 > + > .../917-MIPS-ath79-add-spi-nand-driver.patch | 21 + > 2 files changed, 848 insertions(+) > create mode 100644 target/linux/ar71xx/files/drivers/mtd/nand/ath79_spinand.c > create mode 100644 > target/linux/ar71xx/patches-3.18/917-MIPS-ath79-add-spi-nand-driver.patch > > diff --git a/target/linux/ar71xx/files/drivers/mtd/nand/ath79_spinand.c > b/target/linux/ar71xx/files/drivers/mtd/nand/ath79_spinand.c > new file mode 100644 > index 000..bcc90f0 > --- /dev/null > +++ b/target/linux/ar71xx/files/drivers/mtd/nand/ath79_spinand.c > @@ -0,0 +1,827 @@ > +/* > + * Copyright (c) 2015 The Linux Foundation. All rights reserved. > + * > + * Copyright (c) 2003-2013 Broadcom Corporation > + * > + * Copyright (c) 2009-2010 Micron Technology, Inc. > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License > + * as published by the Free Software Foundation; either version 2 > + * of the License, or (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +/* cmd */ > +#define CMD_READ 0x13 > +#define CMD_READ_RDM 0x03 > +#define CMD_PROG_PAGE_LOAD 0x02 > +#define CMD_PROG_PAGE0x84 > +#define CMD_PROG_PAGE_EXC0x10 > +#define CMD_ERASE_BLK0xd8 > +#define CMD_WR_ENABLE0x06 > +#define CMD_WR_DISABLE 0x04 > +#define CMD_READ_ID 0x9f > +#define CMD_RESET0xff > +#define CMD_READ_REG 0x0f > +#define CMD_WRITE_REG0x1f > + > +/* feature/ status reg */ > +#define REG_BLOCK_LOCK 0xa0 > +#define REG_OTP 0xb0 > +#define REG_STATUS 0xc0 > + > +/* status */ > +#define STATUS_OIP_MASK 0x01 > +#define STATUS_READY (0 << 0) > +#define STATUS_BUSY (1 << 0) use the BIT macro for all instances of (1< + > +#define STATUS_E_FAIL_MASK 0x04 > +#define STATUS_E_FAIL(1 << 2) > + > +#define STATUS_P_FAIL_MASK 0x08 > +#define STATUS_P_FAIL(1 << 3) > + > +#define STATUS_ECC_MASK 0x07 > +#define STATUS_ECC_ERR_BITS5 0x03 > +#define STATUS_ECC_ERR_BITS6 0x04 > +#define STATUS_ECC_ERR_BITS7 0x05 > +#define STATUS_ECC_ERR_BITS8 0x06 > +#define STATUS_ECC_ERROR 0x07 > +#define STATUS2ECC(status) (((status) >> 4) & STATUS_ECC_MASK) > + > +/* ECC/OTP enable defines */ > +#define REG_ECC_MASK 0x10 > +#define REG_ECC_OFF (0 << 4) > +#define REG_ECC_ON (1 << 4) > + > +#define REG_OTP_EN (1 << 6) > +#define REG_OTP_PRT (1 << 7) > + > +/* block lock */ > +#define BL_ALL_UNLOCKED 0 > + > +#define BLOCK_TO_RA(b) ((b) << 6) > + > +#define BUFSIZE (10 * 64 * 2048) *cough* you dont need a buffer with a size of 1310720 regardless of what you are doing. > +#define CACHE_BUF2112 > + > +struct ath79_spinand_info { > + struct spi_device *spi; > + void*priv; > +}; > + > +struct ath79_spinand_state { > + uint32_tcol; > + uint32_trow; > + int buf_ptr; > + u8 *buf; > +}; > + > +struct ath79_spinand_command { > + u8 cmd; > + u32 n_addr; /* Number of address */ > + u8 addr[3];/* Reg Offset */ > + u32 n_dummy;/* Dummy use */ > + u32 n_tx; /* Number of tx bytes */ > + u8 *tx_buf;/* Tx buf */ > + u32
[OpenWrt-Devel] How to activate Device Tree on the Raspberry Pi and add a device?
Hi, I'm trying to integrate a new hardware connected via I2C into OpenWRT. I already integrated the according driver so that it shows up in the menuconfig under "Kernel Modules -> Other modules". To get I2C working I also activated the modules () kmod-i2c-bcm2708 and kmod-i2c-core. Now I would like to integrate my hardware which is connected via I2C into the Device Tree. For some platforms I found the dts and dtsi files in target/linux/platform/dts. But I did not find these files for the Raspberry Pi. However I found some patch files in target/linux/brcm2708/patches-3.18/ which seem to integrate some hardware info into the device tree. So what would be the best way forward to integrate my device into the device tree? Thanks, Michael Environment: OpenWRT version: Latest version from git.openwrt.org/openwrt.git Hardware: Raspberry Pi B (brcm2708) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] 6LoWPAN with OpenWRT
Hi Varka Bhadram, >6LoWPAN over IEEE-802.15.4 support available in OpenWRT from the kernel version 4.0 [1] As I see this version doesn't support all Processors, I'm using : openwrt-at91-legacy-9g25ek-uImage So can you please inform me if it's supported with version 4.0 and if you please provide me with the download links please :) >Right now kernel provides the support for the following 802.15.4 devices [2]. >Also you can find the details at [3] I'm using Jennic JN5148 RF module and I didn't see it in the supported list :( How to add Jennic support please ? What is the must included packages when configuring the kernel before "make" so I can run 6LoWPAN ! Thanks for your help Firas ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 3/3] ar71xx: add spi nand driver support
Hi, On Fri, Jul 10, 2015 at 9:18 AM, wrote: > From: Miaoqing Pan > > Derived from 'drivers/staging/mt29f_spinand'. > > Only support Giga Device SPI NAND device now, > - GD5F1GQ4U 1G 3.3V 8-bit > - GD5F2GQ4U 2G 3.3V 8-bit > - GD5F1GQ4R 1G 1.8V 8-bit > - GD5F2GQ4R 2G 1.8V 8-bit > > Signed-off-by: Miaoqing Pan This looks exactly like mt29f_spinand, except with ath79_ prefixed to everything. Also I don't see anything ath79 specific in here. Why can't you just use mt29f_spinand directly? And why do you need to create a copy of it instead of just fixing it in the driver itself? Jonas ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 3/3] ar71xx: add spi nand driver support
Agree with you, I investigated this, tried to merge two into one. E.g. Implement the common core for spinand, separate vendors related codes, but give up finally as no device to verify mt29f:( So I only add it to support for ath79 platform. Thanks, Miaoqing -Original Message- From: Jonas Gorski [mailto:j...@openwrt.org] Sent: Friday, July 10, 2015 5:44 PM To: Pan, Miaoqing Cc: OpenWrt Development List Subject: Re: [OpenWrt-Devel] [PATCH 3/3] ar71xx: add spi nand driver support Hi, On Fri, Jul 10, 2015 at 9:18 AM, wrote: > From: Miaoqing Pan > > Derived from 'drivers/staging/mt29f_spinand'. > > Only support Giga Device SPI NAND device now, > - GD5F1GQ4U 1G 3.3V 8-bit > - GD5F2GQ4U 2G 3.3V 8-bit > - GD5F1GQ4R 1G 1.8V 8-bit > - GD5F2GQ4R 2G 1.8V 8-bit > > Signed-off-by: Miaoqing Pan This looks exactly like mt29f_spinand, except with ath79_ prefixed to everything. Also I don't see anything ath79 specific in here. Why can't you just use mt29f_spinand directly? And why do you need to create a copy of it instead of just fixing it in the driver itself? Jonas ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] firstboot aka jffs2reset - can this brick the bootloader?
Hi list, I've flashed yesterday's EnGenius EPG5000 image from https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/openwrt-ar71xx-generic-epg5000-squashfs-sysupgrade.bin which went fine. Thing is 'firstboot' in failsafe mode via telnet just simply hang without outputting anything (erasing jffs2 in mounted mode seemed to work fine). Now after reboot in serial console, I just get ---snip--- U-Boot 1.0.2 (Sep 3 2014 - 15:17:15) Product Name: ESR1200_1750 ap136 - Scorpion 1.0 DRAM:256 MB ---snap--- ... and nothing more. Is there anything I can do to diagnose the problem/ does jffs2reset need some config/ any ideas what might have happened? Thanks, Christian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH][libubox] ustream-fd: handle uloop errors
On 2015-07-10 09:23, Philip Craig wrote: > Otherwise uloop will delete the fd and the ustream will receive no > notification of the error. > > Signed-off-by: Philip Craig I think this fix is incomplete. When an error occurs, ustream-fd should delete the fd after setting the error flags to avoid getting further spurious error calls. ustream_fd_set_uloop should probably recognize the case of both ULOOP_READ and ULOOP_WRITE being unset and should call uloop_fd_delete in that case. __ustream_fd_poll should probably call ustream_fd_set_uloop when setting an error flag. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: adding support for OY-0001 Wireless Router
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Isn't this normally called the "OYE-0001" ? not "OY-0001" ? The website and all literature I've seen uses the "OYE-0001" name... Regardless, in many places, you have not followed the existing alphabetical order. LiWeijian wrote: > From: Tom Deng <2579131...@qq.com> > > Adding support for OY-0001 Wireless Router. > OY-0001 is a wireless router made by oyewifi.com. Below is the details: > MT7620A, 128MB DDR2, 16MB FLASH, SD Slot, USB 2.0, 4 x LAN + 1 x WAN. > Signed-off-by: Tom Deng <2579131...@qq.com> > --- > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds > b/target/linux/ramips/base-files/etc/board.d/01_leds > index 545bd70..fe3a79d 100755 > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > @@ -238,6 +238,10 @@ case $board in > set_wifi_led "zbtlink:blue:air" > set_usb_led "zbtlink:blue:usb" > ;; > + oy-0001) > + ucidef_set_led_default "power" "power" "oy:green:power" "1" > + set_wifi_led "oy:green:wifi" > + ;; > wr8305rt) > ucidef_set_led_default "power" "power" "wr8305rt:sys" "1" > set_usb_led "wr8305rt:usb" > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > b/target/linux/ramips/base-files/etc/board.d/02_network > index bc1fc01..9fb3535 100755 > --- a/target/linux/ramips/base-files/etc/board.d/02_network > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > @@ -139,6 +139,7 @@ ramips_setup_interfaces() > mzk-750dhp | \ > whr-300hp2 | \ > whr-600d | \ > + oy-0001 | \ > wsr-600 | \ > wsr-1166 | \ > wt1520 | \ > @@ -283,6 +284,11 @@ ramips_setup_macs() > wan_mac=$(mtd_get_mac_binary devdata 7) > ;; > > + oy-0001) > + lan_mac=$(mtd_get_mac_binary factory 40) > + wan_mac=$(mtd_get_mac_binary factory 46) > + ;; > + > w306r-v20) > lan_mac=$(cat /sys/class/net/eth0/address) > wan_mac=$(macaddr_add "$lan_mac" 5) > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > b/target/linux/ramips/base-files/lib/ramips.sh > index d2a1856..3d40ab9 100755 > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -400,6 +400,9 @@ ramips_board_detect() { > *"Zbtlink ZBT-WA05") > name="zbt-wa05" > ;; > + *"OY-0001") > + name="oy-0001" > + ;; > *"ZBT WR8305RT") > name="wr8305rt" > ;; > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh > b/target/linux/ramips/base-files/lib/upgrade/platform.sh > index cedd62b..8f45a84 100755 > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > @@ -116,6 +116,7 @@ platform_check_image() { > wr6202 |\ > wr8305rt |\ > wrtnode |\ > + oy-0001 |\ > wt1520 |\ > wt3020 |\ > x5 |\ > diff --git a/target/linux/ramips/dts/OY-0001.dts > b/target/linux/ramips/dts/OY-0001.dts > new file mode 100644 > index 000..48b7099 > --- /dev/null > +++ b/target/linux/ramips/dts/OY-0001.dts > @@ -0,0 +1,123 @@ > +/dts-v1/; > + > +/include/ "mt7620a.dtsi" > + > +/ { > + compatible = "ralink,mt7620a-soc"; > + model = "OY-0001"; > + > +chosen { > +bootargs = "console=ttyS0,115200"; > +}; > + > + palmbus@1000 { > + gpio2: gpio@660 { > + status = "okay"; > + }; > + > + gpio3: gpio@688 { > + status = "okay"; > + }; > + > + spi@b00 { > + status = "okay"; > + > + m25p80@0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "w25q128"; > + reg = <0 0>; > + linux,modalias = "m25p80", "w25q128"; > + spi-max-frequency = <1000>; > + > + partition@0 { > + label = "u-boot"; > + reg = <0x0 0x3>; > + read-only; > + }; > + > + partition@3 { > + label = "u-boot-env"; > + reg = <0x3 0x1>; > + read-only; > + }; > + > + factory: partition@4 { > + label = "factory"; > + reg = <0x4 0x1>; > +
Re: [OpenWrt-Devel] [PATCH] ramips: adding support for OY-0001 Wireless Router
On 10/07/2015 13:27, Karl Palsson wrote: > Isn't this normally called the "OYE-0001" ? not "OY-0001" ? The website > and all literature I've seen uses the "OYE-0001" name... > > Regardless, in many places, you have not followed the existing > alphabetical order. > there never has been an alphabetic order requirement and many entries are not alphabetically sorted > LiWeijian wrote: >> From: Tom Deng <2579131...@qq.com> > >> Adding support for OY-0001 Wireless Router. >> OY-0001 is a wireless router made by oyewifi.com. Below is the details: >> MT7620A, 128MB DDR2, 16MB FLASH, SD Slot, USB 2.0, 4 x LAN + 1 x WAN. >> Signed-off-by: Tom Deng <2579131...@qq.com> >> --- >> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds >> b/target/linux/ramips/base-files/etc/board.d/01_leds >> index 545bd70..fe3a79d 100755 >> --- a/target/linux/ramips/base-files/etc/board.d/01_leds >> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds >> @@ -238,6 +238,10 @@ case $board in >> set_wifi_led "zbtlink:blue:air" >> set_usb_led "zbtlink:blue:usb" >> ;; >> +oy-0001) >> +ucidef_set_led_default "power" "power" "oy:green:power" "1" >> +set_wifi_led "oy:green:wifi" >> +;; >> wr8305rt) >> ucidef_set_led_default "power" "power" "wr8305rt:sys" "1" >> set_usb_led "wr8305rt:usb" >> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network >> b/target/linux/ramips/base-files/etc/board.d/02_network >> index bc1fc01..9fb3535 100755 >> --- a/target/linux/ramips/base-files/etc/board.d/02_network >> +++ b/target/linux/ramips/base-files/etc/board.d/02_network >> @@ -139,6 +139,7 @@ ramips_setup_interfaces() >> mzk-750dhp | \ >> whr-300hp2 | \ >> whr-600d | \ >> +oy-0001 | \ >> wsr-600 | \ >> wsr-1166 | \ >> wt1520 | \ >> @@ -283,6 +284,11 @@ ramips_setup_macs() >> wan_mac=$(mtd_get_mac_binary devdata 7) >> ;; > >> +oy-0001) >> +lan_mac=$(mtd_get_mac_binary factory 40) >> +wan_mac=$(mtd_get_mac_binary factory 46) >> +;; >> + >> w306r-v20) >> lan_mac=$(cat /sys/class/net/eth0/address) >> wan_mac=$(macaddr_add "$lan_mac" 5) >> diff --git a/target/linux/ramips/base-files/lib/ramips.sh >> b/target/linux/ramips/base-files/lib/ramips.sh >> index d2a1856..3d40ab9 100755 >> --- a/target/linux/ramips/base-files/lib/ramips.sh >> +++ b/target/linux/ramips/base-files/lib/ramips.sh >> @@ -400,6 +400,9 @@ ramips_board_detect() { >> *"Zbtlink ZBT-WA05") >> name="zbt-wa05" >> ;; >> +*"OY-0001") >> +name="oy-0001" >> +;; >> *"ZBT WR8305RT") >> name="wr8305rt" >> ;; >> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh >> b/target/linux/ramips/base-files/lib/upgrade/platform.sh >> index cedd62b..8f45a84 100755 >> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh >> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh >> @@ -116,6 +116,7 @@ platform_check_image() { >> wr6202 |\ >> wr8305rt |\ >> wrtnode |\ >> +oy-0001 |\ >> wt1520 |\ >> wt3020 |\ >> x5 |\ >> diff --git a/target/linux/ramips/dts/OY-0001.dts >> b/target/linux/ramips/dts/OY-0001.dts >> new file mode 100644 >> index 000..48b7099 >> --- /dev/null >> +++ b/target/linux/ramips/dts/OY-0001.dts >> @@ -0,0 +1,123 @@ >> +/dts-v1/; >> + >> +/include/ "mt7620a.dtsi" >> + >> +/ { >> +compatible = "ralink,mt7620a-soc"; >> +model = "OY-0001"; >> + >> +chosen { >> +bootargs = "console=ttyS0,115200"; >> +}; >> + >> +palmbus@1000 { >> +gpio2: gpio@660 { >> +status = "okay"; >> +}; >> + >> +gpio3: gpio@688 { >> +status = "okay"; >> +}; >> + >> +spi@b00 { >> +status = "okay"; >> + >> +m25p80@0 { >> +#address-cells = <1>; >> +#size-cells = <1>; >> +compatible = "w25q128"; >> +reg = <0 0>; >> +linux,modalias = "m25p80", "w25q128"; >> +spi-max-frequency = <1000>; >> + >> +partition@0 { >> +label = "u-boot"; >> +reg = <0x0 0x3>; >> +read-only; >> +}; >> + >> +partition@3 { >> +label = "u-boot-env"; >> +reg = <0x3 0x1>; >> +read-only; >> +}; >> + >> +factory: partition@40
Re: [OpenWrt-Devel] [PATCH] ramips: adding support for OY-0001 Wireless Router
Hi, Thanks very much for your comments and taking time to check the name. Regarding the 'OY-0001', it's for business reason to use 'OY-0001' but not 'OYE-0001'. The 'old' name in the website also will be updated afterward. Regards, Weijian > Subject: Re: [OpenWrt-Devel] [PATCH] ramips: adding support for OY-0001 > Wireless Router > From: ka...@tweak.net.au > To: younfa...@hotmail.com > CC: openwrt-devel@lists.openwrt.org > Date: Fri, 10 Jul 2015 11:27:55 + > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Isn't this normally called the "OYE-0001" ? not "OY-0001" ? The website > and all literature I've seen uses the "OYE-0001" name... > > Regardless, in many places, you have not followed the existing > alphabetical order. > > LiWeijian wrote: > > From: Tom Deng <2579131...@qq.com> > > > > Adding support for OY-0001 Wireless Router. > > OY-0001 is a wireless router made by oyewifi.com. Below is the details: > > MT7620A, 128MB DDR2, 16MB FLASH, SD Slot, USB 2.0, 4 x LAN + 1 x WAN. > > Signed-off-by: Tom Deng <2579131...@qq.com> > > --- > > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds > > b/target/linux/ramips/base-files/etc/board.d/01_leds > > index 545bd70..fe3a79d 100755 > > --- a/target/linux/ramips/base-files/etc/board.d/01_leds > > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds > > @@ -238,6 +238,10 @@ case $board in > > set_wifi_led "zbtlink:blue:air" > > set_usb_led "zbtlink:blue:usb" > > ;; > > + oy-0001) > > + ucidef_set_led_default "power" "power" "oy:green:power" "1" > > + set_wifi_led "oy:green:wifi" > > + ;; > > wr8305rt) > > ucidef_set_led_default "power" "power" "wr8305rt:sys" "1" > > set_usb_led "wr8305rt:usb" > > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network > > b/target/linux/ramips/base-files/etc/board.d/02_network > > index bc1fc01..9fb3535 100755 > > --- a/target/linux/ramips/base-files/etc/board.d/02_network > > +++ b/target/linux/ramips/base-files/etc/board.d/02_network > > @@ -139,6 +139,7 @@ ramips_setup_interfaces() > > mzk-750dhp | \ > > whr-300hp2 | \ > > whr-600d | \ > > + oy-0001 | \ > > wsr-600 | \ > > wsr-1166 | \ > > wt1520 | \ > > @@ -283,6 +284,11 @@ ramips_setup_macs() > > wan_mac=$(mtd_get_mac_binary devdata 7) > > ;; > > > > + oy-0001) > > + lan_mac=$(mtd_get_mac_binary factory 40) > > + wan_mac=$(mtd_get_mac_binary factory 46) > > + ;; > > + > > w306r-v20) > > lan_mac=$(cat /sys/class/net/eth0/address) > > wan_mac=$(macaddr_add "$lan_mac" 5) > > diff --git a/target/linux/ramips/base-files/lib/ramips.sh > > b/target/linux/ramips/base-files/lib/ramips.sh > > index d2a1856..3d40ab9 100755 > > --- a/target/linux/ramips/base-files/lib/ramips.sh > > +++ b/target/linux/ramips/base-files/lib/ramips.sh > > @@ -400,6 +400,9 @@ ramips_board_detect() { > > *"Zbtlink ZBT-WA05") > > name="zbt-wa05" > > ;; > > + *"OY-0001") > > + name="oy-0001" > > + ;; > > *"ZBT WR8305RT") > > name="wr8305rt" > > ;; > > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh > > b/target/linux/ramips/base-files/lib/upgrade/platform.sh > > index cedd62b..8f45a84 100755 > > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh > > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh > > @@ -116,6 +116,7 @@ platform_check_image() { > > wr6202 |\ > > wr8305rt |\ > > wrtnode |\ > > + oy-0001 |\ > > wt1520 |\ > > wt3020 |\ > > x5 |\ > > diff --git a/target/linux/ramips/dts/OY-0001.dts > > b/target/linux/ramips/dts/OY-0001.dts > > new file mode 100644 > > index 000..48b7099 > > --- /dev/null > > +++ b/target/linux/ramips/dts/OY-0001.dts > > @@ -0,0 +1,123 @@ > > +/dts-v1/; > > + > > +/include/ "mt7620a.dtsi" > > + > > +/ { > > + compatible = "ralink,mt7620a-soc"; > > + model = "OY-0001"; > > + > > +chosen { > > +bootargs = "console=ttyS0,115200"; > > +}; > > + > > + palmbus@1000 { > > + gpio2: gpio@660 { > > + status = "okay"; > > + }; > > + > > + gpio3: gpio@688 { > > + status = "okay"; > > + }; > > + > > + spi@b00 { > > + status = "okay"; > > + > > + m25p80@0 { > > + #address-cells = <1>; > > + #size-cells = <1>; > > + compatible = "w25q128"; > > + reg = <0 0>; > > + linux,modalias = "m25p80", "w25q128"; > > + spi-max-frequency = <1000>; > > + > > + partition@0 { > > + label = "u-boot"; > > +
Re: [OpenWrt-Devel] Presentation on Linux Containers (LXC)
Bastian, I just saw this reply now. I think that's a great idea! We'll make sure to do introductions next time! Eric On Fri, Jun 26, 2015 at 10:25 AM, Bastian Bittorf wrote: > * Javier Domingo Cansino [26.06.2015 17:22]: > > Thanks for sharing!! > > short comment from myself (for the next hangout). > everyone who is speaking should do a > short "introduce myself" with background. > > bye, bastian > -- Eric Schultz, Community Manager, prpl Foundation http://www.prplfoundation.org eschu...@prplfoundation.org cell: 920-539-0404 skype: ericschultzwi @EricPrpl ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: adding support for OY-0001 Wireless Router
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 John Crispin wrote: > > > On 10/07/2015 13:27, Karl Palsson wrote: > > Isn't this normally called the "OYE-0001" ? not "OY-0001" ? The website > > and all literature I've seen uses the "OYE-0001" name... > > > > Regardless, in many places, you have not followed the existing > > alphabetical order. > > > there never has been an alphabetic order requirement and many entries > are not alphabetically sorted Lots of requirements have never been written down I'm sure. Most of the files are generally well sorted. Would you rather they were not sorted? Is it _bad_ of me to provide cursory review comments that try and steer towards maintaining clean, ordered lists? Am I making your job more difficult in any way? Sincerely, Karl P -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJVn+JuAAoJEBmotQ/U1cr2IvsP/3RuqMrpDndd5/4gK9V09TKD f0rOZFAs9AEFx2wo2nGF0g2KQfXYmljZYjby+wWctRrDvr0hqggdvUyq7vpZ+f6v H0UKTBeJtnMUOMoNpMMmma1anJ7cczB4CkKGmcxaKd6DRGg7ZgPXvyUoNc2EBaVE PY97ylEDcahOuiomYHXMz0F7OLCCjn87DIyoaTRNbxKfJPl+l/dAONGcerQx7jR/ tFdn0Kqn72+7kd+n6mwA3DStdm/2aKgFXLf04kQKAGPnOA9m/ewCJx67wt85VGz4 /zXBot8gJ9q0/SpPUdkRwuwFTNfmDOtDdl9eQwSqts8RXBFo6AcwGAbfhyORiK5I CPXvAbiqbgXuAEWY52ZHjEEM3pnZD7DZh1aZgqdtDeNNLKSb5HkuIEpTJDD6WTKa g9+q6cBO4BMrzmwprrsHdiTO8kmxK8V7S8+IAP133L77hWKwqMWGsf2mIMWq/GZd FTYX83aZkbmV4K1000NDP0haP2Rsu7x9czCCY7FlVPevZSLuXymVO97ueTYMUTDG r2rf3GllKbp0hAUYvu1EsO9AmTJxhTyB9ohw44qmZkfnD6vGRpIQ6WURWHWOxkNZ OxVKD+16ocBL55bWzv16Y+I0vPLf8zzPfSAuAdLnw6MNthNqPWHRAiKOFFgJRfpS Sd11hTjsJycTuqk4KQRw =7hgb -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Raspberry Pi 2 sysupgrade
On 07/09/2015 06:44 AM, John Crispin wrote: >> I have the below change to add rudimentary support for sysupgrade on the >> Raspberry Pi. I looked at the way platform_copy_config() is implemented >> for x86 and tried to do the same, but I get the following error on mount: >> >> mount: mounting /dev/mmcblk0p2 on /mnt failed: Device or resource busy > > in that case its either still flushing the cache or has not been > properly unmounted i think. you could try adding the "partprobe" tool to > force a rescan of the table but i am not sure this is the problem here You are right. I tried 'partprobe -s /dev/mmcblk0' and it shows the partitions correctly but mount still fails. I also tried 'sync' before trying to mount to flush the cache with no effect. So the suspect is that it has not been properly unmounted. So I tried to 'unmount -f /dev/mmcblk0p2' but that fails with "umount: can't forcibly umount /dev/mmcblk0p2: Invalid argument" Here are the mounts at that time: rootfs on / type rootfs (rw) proc on /proc type proc (rw,noatime) sysfs on /sys type sysfs (rw,noatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime) tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,relatime,mode=600) debugfs on /sys/kernel/debug type debugfs (rw,noatime) tmpfs on / type tmpfs (rw,nosuid,nodev,noatime) "rootfs on / type rootfs (rw)" should be the RAM rootfs, no? How and were to unmount / correctly? bruno ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] lantiq DSL drivers / firmware info
Hello Martin, I've just applied your patch against trunk (r46292) and flashed this firmware. Unfortunately linked patch did not apply cleanly because some of your changes were accepted into openwrt trunk. I was able to fix it locally but I hope you will update your patch for others to test it. So far new driver seems to run smoothly but I'll give it some time. I have HUGE problems with wifi but I don't think it's related to lantiq stuff On Sun, Jun 28, 2015 at 2:02 AM, Martin Blumenstingl wrote: > On Sat, Jun 6, 2015 at 3:23 PM, Sylwester Petela wrote: >> After 9 days and bit of performance drop I reverted back to stripped out >> init script and also lowered debug level to default so I can track what is >> causing these issues. > If it is a driver issue then you can test the new version (more info below). > > A few days ago I got a new set of DSL drivers - version 4.16.2.4 to be exact. > I am writing this very email while connected with that updated driver. > (this is with firmware > 5.7.3.3.0.7-5.7.1.5.0.2 / 186b5406e6511c97d997b48f5e0ec5ad3f62600d on > a VDSL line). > > The patch for updating the DSL driver can be found here: [0] > Please note that it depends on [1] > > Regards, > Martin > > > [0] https://gist.github.com/xdarklight/3452b26620b28f3bc577 > [1] https://lists.openwrt.org/pipermail/openwrt-devel/2015-June/033911.html ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Raspberry Pi 2 sysupgrade
On 07/08/2015 07:42 PM, Bruno Randolf wrote: > Hi! > > I have the below change to add rudimentary support for sysupgrade on the > Raspberry Pi. I looked at the way platform_copy_config() is implemented > for x86 and tried to do the same, but I get the following error on mount: > > mount: mounting /dev/mmcblk0p2 on /mnt failed: Device or resource busy > > I believe I'd need some way to re-read the partition table after the dd > command. How does it work on x86? Any ideas? > > Also would it be OK to gzip the sdcard image to save space? It > compresses from 76M to 11M. I think it would be nice to put the gzip command into an ifneq ($(CONFIG_TARGET_IMAGES_GZIP),) check. CONFIG_TARGET_IMAGES_GZIP defaults to y, but is currently only respected on x86... I guess it would make sense to handle it on other targets with ext4 images as well. Matthias > > Below is the diff, but this is not a properly formatted patch, yet. > > bruno > > diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh > b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh > new file mode 100644 > index 000..95ade38 > --- /dev/null > +++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh > @@ -0,0 +1,19 @@ > +platform_check_image() { > + # i know no way to verify the image > + return 0; > +} > + > +platform_do_upgrade() { > + sync > + get_image "$1" | dd of=/dev/mmcblk0 bs=2M conv=fsync > + sleep 1 > +} > + > +## mount does not work. I think I'd need to re-read the partition table! > +#platform_copy_config() { > +# echo "*** platform_copy_config called" > /dev/console > +# mount -t ext4 -o rw,noatime /dev/mmcblk0p2 /mnt > +# cp -af "$CONF_TAR" /mnt/ > +# umount /mnt > +# echo "*** platform_copy_config done" > /dev/console > +#} > diff --git a/target/linux/brcm2708/image/Makefile > b/target/linux/brcm2708/image/Makefile > index e70bdd0..095cf0d 100644 > --- a/target/linux/brcm2708/image/Makefile > +++ b/target/linux/brcm2708/image/Makefile > @@ -28,6 +28,7 @@ define Image/Build/RaspberryPi > mcopy -i $(KDIR)/boot.img $(KDIR)/Image ::kernel.img # Copy > OpenWrt built kernel > ./gen_rpi_sdcard_img.sh > $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img $(KDIR)/boot.img > $(KDIR)/root.$(1) \ > $(CONFIG_BRCM2708_SD_BOOT_PARTSIZE) > $(CONFIG_TARGET_ROOTFS_PARTSIZE) > + gzip -k -f $(BIN_DIR)/$(IMG_PREFIX)-sdcard-vfat-$(1).img > endef > > define Image/Build > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: adding support for OY-0001 Wireless Router
On 10/07/2015 17:19, Karl Palsson wrote: > John Crispin wrote: > > >> On 10/07/2015 13:27, Karl Palsson wrote: >>> Isn't this normally called the "OYE-0001" ? not "OY-0001" ? The website >>> and all literature I've seen uses the "OYE-0001" name... >>> >>> Regardless, in many places, you have not followed the existing >>> alphabetical order. >>> >> there never has been an alphabetic order requirement and many entries >> are not alphabetically sorted > > Lots of requirements have never been written down I'm sure. Most of the > files are generally well sorted. Would you rather they were not sorted? > Is it _bad_ of me to provide cursory review comments that try and steer > towards maintaining clean, ordered lists? Am I making your job more > difficult in any way? > > Sincerely, > Karl P > > ok agreed, with ar71xx we already have alphabetic order. maybe we should just bite the bullet, sort the ramips scripts and thus also enforcing the ordering on this target ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] ramips: adding support for OY-0001 Wireless Router
On 10/07/2015 21:31, John Crispin wrote: > > > On 10/07/2015 17:19, Karl Palsson wrote: >> John Crispin wrote: >> >> >>> On 10/07/2015 13:27, Karl Palsson wrote: Isn't this normally called the "OYE-0001" ? not "OY-0001" ? The website and all literature I've seen uses the "OYE-0001" name... Regardless, in many places, you have not followed the existing alphabetical order. >>> there never has been an alphabetic order requirement and many entries >>> are not alphabetically sorted >> >> Lots of requirements have never been written down I'm sure. Most of the >> files are generally well sorted. Would you rather they were not sorted? >> Is it _bad_ of me to provide cursory review comments that try and steer >> towards maintaining clean, ordered lists? Am I making your job more >> difficult in any way? >> >> Sincerely, >> Karl P >> >> > > ok agreed, with ar71xx we already have alphabetic order. maybe we should > just bite the bullet, sort the ramips scripts and thus also enforcing > the ordering on this target i just had a closer look and that would be a really huge and messy patch. additionally we have bits like this b2c | \ nw718 | \ psr-680w | \ sl-r7205 | \ w502u | \ wr6202) ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ;; which started with 1 case and had many added over time thus breaking the ordering. not sure if this is worth the effort. once i find time to finish the board detect code all this info will be inside json files anyway, which i hope will around the end of the year. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 3/3] ar71xx: add spi nand driver support
On 10/07/15 02:54, Pan, Miaoqing wrote: > Agree with you, I investigated this, tried to merge two into one. E.g. > Implement the common core for spinand, separate vendors related codes, but > give up finally as no device to verify mt29f:( So I only add it to support > for ath79 platform. There are some on-going efforts to come up with proper SPI NAND support in the MTD layer, you might want to piggy back on that effort: http://lists.infradead.org/pipermail/linux-mtd/2015-June/059837.html > > Thanks, > Miaoqing > > -Original Message- > From: Jonas Gorski [mailto:j...@openwrt.org] > Sent: Friday, July 10, 2015 5:44 PM > To: Pan, Miaoqing > Cc: OpenWrt Development List > Subject: Re: [OpenWrt-Devel] [PATCH 3/3] ar71xx: add spi nand driver support > > Hi, > > On Fri, Jul 10, 2015 at 9:18 AM, wrote: >> From: Miaoqing Pan >> >> Derived from 'drivers/staging/mt29f_spinand'. >> >> Only support Giga Device SPI NAND device now, >> - GD5F1GQ4U 1G 3.3V 8-bit >> - GD5F2GQ4U 2G 3.3V 8-bit >> - GD5F1GQ4R 1G 1.8V 8-bit >> - GD5F2GQ4R 2G 1.8V 8-bit >> >> Signed-off-by: Miaoqing Pan > > This looks exactly like mt29f_spinand, except with ath79_ prefixed to > everything. Also I don't see anything ath79 specific in here. > > Why can't you just use mt29f_spinand directly? And why do you need to create > a copy of it instead of just fixing it in the driver itself? > > > Jonas > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH procd] move /dev/shm to /tmp/shm
Since the /dev filesystem is tiny, /dev/shm needs to live somewhere else. Signed-off-by: Daniel Gimpelevich --- a/initd/early.c 2015-06-19 14:01:25.0 -0700 +++ b/initd/early.c 2015-07-10 15:04:23.270143065 -0700 @@ -66,16 +66,20 @@ mount("sysfs", "/sys", "sysfs", MS_NOATIME, 0); mount("none", "/sys/fs/cgroup", "cgroup", 0, 0); mount("tmpfs", "/dev", "tmpfs", MS_NOATIME, "mode=0755,size=512K"); - mkdir("/dev/shm", 01777); + symlink("/tmp/shm", "/dev/shm"); mkdir("/dev/pts", 0755); mount("devpts", "/dev/pts", "devpts", MS_NOATIME, "mode=600"); early_dev(); early_console("/dev/console"); - if (mount_zram_on_tmp()) + if (mount_zram_on_tmp()) { mount("tmpfs", "/tmp", "tmpfs", MS_NOSUID | MS_NODEV | MS_NOATIME, NULL); - else - mkdev("*", 0600); + mkdir("/tmp/shm", 01777); + } else { + mkdir("/tmp/shm", 01777); + mount("tmpfs", "/tmp/shm", "tmpfs", MS_NOSUID | MS_NODEV | MS_NOATIME, + "mode=01777"); + } mkdir("/tmp/run", 0777); mkdir("/tmp/lock", 0777); mkdir("/tmp/state", 0777); --- a/plug/coldplug.c 2015-06-19 14:01:25.0 -0700 +++ b/plug/coldplug.c 2015-07-10 15:04:19.270123233 -0700 @@ -45,7 +45,7 @@ umount2("/dev/pts", MNT_DETACH); umount2("/dev/", MNT_DETACH); mount("tmpfs", "/dev", "tmpfs", 0, "mode=0755,size=512K"); - mkdir("/dev/shm", 01777); + symlink("/tmp/shm", "/dev/shm"); mkdir("/dev/pts", 0755); umask(oldumask); mount("devpts", "/dev/pts", "devpts", 0, 0); ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] Make virtualization guests built for pentium4 with SMP
Signed-off-by: Daniel Gimpelevich --- include/target.mk | 1 + target/linux/x86/kvm_guest/config-default | 15 ++- target/linux/x86/kvm_guest/target.mk | 1 + target/linux/x86/xen_domu/target.mk | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/target.mk b/include/target.mk index bfead52..3e7f17d 100644 --- a/include/target.mk +++ b/include/target.mk @@ -222,6 +222,7 @@ ifeq ($(DUMP),1) ifeq ($(ARCH),i386) CPU_TYPE ?= i486 CPU_CFLAGS_i486 = -march=i486 +CPU_CFLAGS_pentium4 = -march=pentium4 CPU_CFLAGS_geode = -march=geode -mmmx -m3dnow endif ifneq ($(findstring arm,$(ARCH)),) diff --git a/target/linux/x86/kvm_guest/config-default b/target/linux/x86/kvm_guest/config-default index f26e268..b54b1df 100644 --- a/target/linux/x86/kvm_guest/config-default +++ b/target/linux/x86/kvm_guest/config-default @@ -19,12 +19,14 @@ CONFIG_ACPI_PROCESSOR=y # CONFIG_ACPI_THERMAL is not set # CONFIG_ACPI_WMI is not set CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y # CONFIG_ASUS_LAPTOP is not set CONFIG_CPU_IDLE_GOV_MENU=y # CONFIG_EEEPC_LAPTOP is not set # CONFIG_EFI is not set CONFIG_HAVE_ACPI_APEI=y CONFIG_HAVE_ACPI_APEI_NMI=y +# CONFIG_HIGHMEM64G is not set CONFIG_HOTPLUG_PCI=y CONFIG_HOTPLUG_PCI_ACPI=y # CONFIG_HOTPLUG_PCI_ACPI_IBM is not set @@ -45,17 +47,21 @@ CONFIG_HYPERVISOR_GUEST=y CONFIG_KVM_GUEST=y # CONFIG_LGUEST is not set # CONFIG_LGUEST_GUEST is not set -CONFIG_NLS=y CONFIG_NO_HZ=y +# CONFIG_M486 is not set +CONFIG_MPENTIUM4=y +CONFIG_NR_CPUS=4 CONFIG_PARAVIRT=y CONFIG_PARAVIRT_CLOCK=y # CONFIG_PARAVIRT_DEBUG is not set +CONFIG_PARAVIRT_SPINLOCKS=y CONFIG_PARAVIRT_TIME_ACCOUNTING=y CONFIG_PCIEAER=y CONFIG_PCIEPORTBUS=y CONFIG_PCI_IOAPIC=y CONFIG_PCI_LABEL=y CONFIG_PCI_MMCONFIG=y +CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_PNP=y CONFIG_PNPACPI=y CONFIG_PNP_DEBUG_MESSAGES=y @@ -64,6 +70,8 @@ CONFIG_RAS=y # CONFIG_SAMSUNG_Q10 is not set # CONFIG_SCSI_VIRTIO is not set CONFIG_SERIAL_8250_PNP=y +CONFIG_SLUB_CPU_PARTIAL=y +CONFIG_SMP=y # CONFIG_THINKPAD_ACPI is not set # CONFIG_TOPSTAR_LAPTOP is not set # CONFIG_TOSHIBA_BT_RFKILL is not set @@ -76,14 +84,19 @@ CONFIG_VIRTIO_PCI=y CONFIG_VIRTUALIZATION=y # CONFIG_VMWARE_BALLOON is not set # CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_X86_32_SMP=y # CONFIG_X86_ACPI_CPUFREQ is not set +# CONFIG_X86_BIGSMP is not set # CONFIG_X86_E_POWERSAVER is not set # CONFIG_X86_GENERIC is not set +CONFIG_X86_HT=y # CONFIG_X86_INTEL_LPSS is not set CONFIG_X86_INTERNODE_CACHE_SHIFT=4 CONFIG_X86_L1_CACHE_SHIFT=4 # CONFIG_X86_LONGHAUL is not set +CONFIG_X86_PAE=y # CONFIG_X86_PAT is not set # CONFIG_X86_PCC_CPUFREQ is not set CONFIG_X86_PM_TIMER=y # CONFIG_X86_PPRO_FENCE is not set +# CONFIG_XEN is not set diff --git a/target/linux/x86/kvm_guest/target.mk b/target/linux/x86/kvm_guest/target.mk index d3f950f..4bdfbc6 100644 --- a/target/linux/x86/kvm_guest/target.mk +++ b/target/linux/x86/kvm_guest/target.mk @@ -1,3 +1,4 @@ BOARDNAME:=KVM Guest FEATURES:=ext4 pci usb DEFAULT_PACKAGES += kmod-virtio-balloon kmod-virtio-net kmod-virtio-random +CPU_TYPE := pentium4 diff --git a/target/linux/x86/xen_domu/target.mk b/target/linux/x86/xen_domu/target.mk index f7a69bf..31d110c 100644 --- a/target/linux/x86/xen_domu/target.mk +++ b/target/linux/x86/xen_domu/target.mk @@ -1,3 +1,4 @@ BOARDNAME:=Xen Paravirt Guest DEFAULT_PACKAGES += kmod-xen-fs kmod-xen-evtchn kmod-xen-netdev kmod-xen-kbddev FEATURES:=display ext4 targz +CPU_TYPE := pentium4 -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Archer C7 CC 15.05-rc1 Ath9K phy1: Failed to stop TX DMA, queues=0x002!
On 10 July 2015 at 05:07, camden lindsay wrote: > I'm sorry, i said ath9k in the subject but the above seems more likely > to be ath10k. > > On Thu, Jul 9, 2015 at 7:03 PM, camden lindsay > wrote: >> Hello- >> >> Thought I should report this, since there was so much discussion and >> confusion on tracker https://dev.openwrt.org/ticket/11862 causing a >> lot of work for some folks here. >> >> ...snip... >> ... >> [2060235.46] ath: phy1: Failed to stop TX DMA, queues=0x002! >> [2060265.46] ath: phy1: Failed to stop TX DMA, queues=0x002! >> [2061047.18] ath: phy1: Failed to stop TX DMA, queues=0x002! >> [2104015.84] ath: phy1: Unable to reset channel, reset status -5 >> [2145012.92] ath10k_pci :01:00.0: SWBA overrun on vdev 0, >> skipped old beacon >> [2145013.03] ath10k_pci :01:00.0: SWBA overrun on vdev 0, >> skipped old beacon It was fixed in trunk (by using newer firmware and driver). Regards, Roman ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel