[OpenWrt-Devel] [PATCH v3] Add support for Ubuquiti EdgeRouter X (UBNT-ERX)

Nikolay Martynov mar.kolya at gmail.com
Wed Dec 2 19:33:06 EST 2015


Hi.

  Thanks for you comments. I'll update and resend.

2015-12-02 19:27 GMT-05:00 Piotr Dymacz <pepe2k at gmail.com>:
> Hello,
>
> Small comments from me below.
>
> Cheers,
> Piotr
>
> 2015-12-03 0:46 GMT+01:00 Nikolay Martynov <mar.kolya at gmail.com>:
>
> [snip]
>
>> diff --git a/target/linux/ramips/mt7621/profiles/ubnt-erx.mk b/target/linux/ramips/mt7621/profiles/ubnt-erx.mk
>
> Please, follow general convention and keep all board profiles in
> "manufacturer.mk" files.
> So, it should be, IMHO, "ubiquiti-networks.mk" (or "ubnt.mk", "ubiquiti.mk").
>
>> new file mode 100644
>> index 0000000..af06c20
>> --- /dev/null
>> +++ b/target/linux/ramips/mt7621/profiles/ubnt-erx.mk
>> @@ -0,0 +1,17 @@
>> +#
>> +# Copyright (C) 2011 OpenWrt.org
>
> Should be 2015.
>
>> +#
>> +# This is free software, licensed under the GNU General Public License v2.
>> +# See /LICENSE for more information.
>> +#
>> +
>> +define Profile/UBNT-ERX
>> +       NAME:=Ubuquiti ERX
>
> Should be Ubiquiti (you have same mistype in subject).
> Plus, why not use here full name of the product - "EdgeRouter X"?
>
>> +       FEATURES += nand
>> +       PACKAGES:=-kmod-mt76 -wpad-mini
>> +endef
>> +
>> +define Profile/UBNT-ERX/Description
>> +       Package for Ubuquiti ERX
>
> Same here.
>
>> +endef
>> +$(eval $(call Profile,UBNT-ERX))
>> diff --git a/target/linux/ramips/patches-3.18/0901-spansion_nand_id_fix.patch b/target/linux/ramips/patches-3.18/0901-spansion_nand_id_fix.patch
>> new file mode 100644
>> index 0000000..a327674
>> --- /dev/null
>> +++ b/target/linux/ramips/patches-3.18/0901-spansion_nand_id_fix.patch
>> @@ -0,0 +1,43 @@
>> +From 8b61a1a33e41456ebeafa0ebe7ec0fccf859861e Mon Sep 17 00:00:00 2001
>> +From: Nikolay Martynov <mar.kolya at gmail.com>
>> +Date: Wed, 25 Nov 2015 20:43:46 -0500
>> +Subject: [PATCH] mtd: nand: Fix Spansion sparearea size detection
>> +
>> +According to datasheet S34ML02G2 and S34ML04G2 have
>> +larger sparea area size than was detected.
>> +
>> +Signed-off-by: Nikolay Martynov <mar.kolya at gmail.com>
>> +---
>> + drivers/mtd/nand/nand_base.c | 9 +++++++++
>> + 1 file changed, 9 insertions(+)
>> +
>> +--- a/drivers/mtd/nand/nand_base.c
>> ++++ b/drivers/mtd/nand/nand_base.c
>> +@@ -3399,6 +3399,7 @@ static void nand_decode_ext_id(struct mt
>> +       /*
>> +        * Field definitions are in the following datasheets:
>> +        * Old style (4,5 byte ID): Samsung K9GAG08U0M (p.32)
>> ++       *                          Spansion S34ML02G2 (p.33)
>> +        * New Samsung (6 byte ID): Samsung K9GAG08U0F (p.44)
>> +        * Hynix MLC   (6 byte ID): Hynix H27UBG8T2B (p.22)
>> +        *
>> +@@ -3496,6 +3497,19 @@ static void nand_decode_ext_id(struct mt
>> +               *busw = (extid & 0x01) ? NAND_BUSWIDTH_16 : 0;
>> +
>> +               /*
>> ++               * Spansion S34ML0[24]G2 have oobsize twice as large
>> ++               * as S34ML01G2 encoded in the same bit. We
>> ++               * differinciate them by their ID length
>> ++               */
>> ++              if (id_data[0] == NAND_MFR_AMD
>> ++                              && (id_data[1] == 0xda
>> ++                               || id_data[1] == 0xdc
>> ++                               || id_data[1] == 0xca
>> ++                               || id_data[1] == 0xcc)) {
>> ++                      mtd->oobsize *= 2;
>> ++              }
>> ++
>> ++              /*
>> +                * Toshiba 24nm raw SLC (i.e., not BENAND) have 32B OOB per
>> +                * 512B page. For Toshiba SLC, we decode the 5th/6th byte as
>> +                * follows:
>> --
>> 2.6.3
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



-- 
Martynov Nikolay.
Email: mar.kolya at gmail.com
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list