diff options
author | Yutang Jiang <yutang.jiang@nxp.com> | 2016-12-24 01:11:32 +0800 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2017-01-03 15:19:15 +0100 |
commit | 1866368a8ab8cacf73aa47f67138040d5620439d (patch) | |
tree | 2b0dd1ba578016957856f59bf4b2edc54d6a46c5 /target/linux/layerscape/patches-4.4/7182-staging-fsl-mc-add-support-for-device-table-matching.patch | |
parent | c6d3a62919a7f993be625391d8593c84423aa021 (diff) | |
download | mtk-20170518-1866368a8ab8cacf73aa47f67138040d5620439d.zip mtk-20170518-1866368a8ab8cacf73aa47f67138040d5620439d.tar.gz mtk-20170518-1866368a8ab8cacf73aa47f67138040d5620439d.tar.bz2 |
layerscape: add ls1088ardb device support
LS1088A is an ARMv8 implementation combining eight ARM A53 processor
cores. The LS1088ARDB is an evaluatoin platform that supports the
LS1088A family SoCs.
Features summary:
- Eight 64-bit ARM v8 Cortex-A53 CPUs
- Data path acceleration architecture 2.0 (DPAA2)
- Ethernet interfaces
- QUADSPI flash, 3 PCIe, 2 USB, 1 SD, 2 DUARTs etc
Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
Diffstat (limited to 'target/linux/layerscape/patches-4.4/7182-staging-fsl-mc-add-support-for-device-table-matching.patch')
-rw-r--r-- | target/linux/layerscape/patches-4.4/7182-staging-fsl-mc-add-support-for-device-table-matching.patch | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/target/linux/layerscape/patches-4.4/7182-staging-fsl-mc-add-support-for-device-table-matching.patch b/target/linux/layerscape/patches-4.4/7182-staging-fsl-mc-add-support-for-device-table-matching.patch new file mode 100644 index 0000000..5ebb459 --- /dev/null +++ b/target/linux/layerscape/patches-4.4/7182-staging-fsl-mc-add-support-for-device-table-matching.patch @@ -0,0 +1,98 @@ +From bd83c4253992d263cb83108e26b4687058f11deb Mon Sep 17 00:00:00 2001 +From: Stuart Yoder <stuart.yoder@nxp.com> +Date: Wed, 22 Jun 2016 16:40:45 -0500 +Subject: [PATCH 182/226] staging: fsl-mc: add support for device table + matching + +Move the definition of fsl_mc_device_id to its proper location in +mod_devicetable.h, and add fsl-mc bus support to devicetable-offsets.c +and file2alias.c to enable device table matching. With this patch udev +based module loading of fsl-mc drivers is supported. + +Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +--- + drivers/staging/fsl-mc/include/mc.h | 13 ------------- + include/linux/mod_devicetable.h | 16 ++++++++++++++++ + scripts/mod/devicetable-offsets.c | 4 ++++ + scripts/mod/file2alias.c | 12 ++++++++++++ + 4 files changed, 32 insertions(+), 13 deletions(-) + +--- a/drivers/staging/fsl-mc/include/mc.h ++++ b/drivers/staging/fsl-mc/include/mc.h +@@ -51,19 +51,6 @@ struct fsl_mc_driver { + container_of(_drv, struct fsl_mc_driver, driver) + + /** +- * struct fsl_mc_device_id - MC object device Id entry for driver matching +- * @vendor: vendor ID +- * @obj_type: MC object type +- * +- * Type of entries in the "device Id" table for MC object devices supported by +- * a MC object device driver. The last entry of the table has vendor set to 0x0 +- */ +-struct fsl_mc_device_id { +- u16 vendor; +- const char obj_type[16]; +-}; +- +-/** + * enum fsl_mc_pool_type - Types of allocatable MC bus resources + * + * Entries in these enum are used as indices in the array of resource +--- a/include/linux/mod_devicetable.h ++++ b/include/linux/mod_devicetable.h +@@ -657,4 +657,20 @@ struct ulpi_device_id { + kernel_ulong_t driver_data; + }; + ++/** ++ * struct fsl_mc_device_id - MC object device identifier ++ * @vendor: vendor ID ++ * @obj_type: MC object type ++ * @ver_major: MC object version major number ++ * @ver_minor: MC object version minor number ++ * ++ * Type of entries in the "device Id" table for MC object devices supported by ++ * a MC object device driver. The last entry of the table has vendor set to 0x0 ++ */ ++struct fsl_mc_device_id { ++ __u16 vendor; ++ const char obj_type[16]; ++}; ++ ++ + #endif /* LINUX_MOD_DEVICETABLE_H */ +--- a/scripts/mod/devicetable-offsets.c ++++ b/scripts/mod/devicetable-offsets.c +@@ -202,5 +202,9 @@ int main(void) + DEVID_FIELD(hda_device_id, rev_id); + DEVID_FIELD(hda_device_id, api_version); + ++ DEVID(fsl_mc_device_id); ++ DEVID_FIELD(fsl_mc_device_id, vendor); ++ DEVID_FIELD(fsl_mc_device_id, obj_type); ++ + return 0; + } +--- a/scripts/mod/file2alias.c ++++ b/scripts/mod/file2alias.c +@@ -1271,6 +1271,18 @@ static int do_hda_entry(const char *file + } + ADD_TO_DEVTABLE("hdaudio", hda_device_id, do_hda_entry); + ++/* Looks like: fsl-mc:vNdN */ ++static int do_fsl_mc_entry(const char *filename, void *symval, ++ char *alias) ++{ ++ DEF_FIELD(symval, fsl_mc_device_id, vendor); ++ DEF_FIELD_ADDR(symval, fsl_mc_device_id, obj_type); ++ ++ sprintf(alias, "fsl-mc:v%08Xd%s", vendor, *obj_type); ++ return 1; ++} ++ADD_TO_DEVTABLE("fslmc", fsl_mc_device_id, do_fsl_mc_entry); ++ + /* Does namelen bytes of name exactly match the symbol? */ + static bool sym_is(const char *name, unsigned namelen, const char *symbol) + { |