summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-02-13 09:26:04 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2017-02-13 09:26:04 +0100
commit30139163b75970fcd58df6b6b987883e36571046 (patch)
tree00bd354cefa617f8474cc73994b1a72c11e770a0 /scripts
parentbb1a6a2fd3cc41be6db1a1362f311456019317b1 (diff)
parent19df384cec181be4407f82377ffbb3059b1ed748 (diff)
downloadbarebox-30139163b75970fcd58df6b6b987883e36571046.tar.gz
barebox-30139163b75970fcd58df6b6b987883e36571046.tar.xz
Merge branch 'for-next/imx'
Diffstat (limited to 'scripts')
-rw-r--r--scripts/imx/imx-usb-loader.c21
-rw-r--r--scripts/imx/imx.c1
2 files changed, 15 insertions, 7 deletions
diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index be0894fa65..9de7bb3a8a 100644
--- a/scripts/imx/imx-usb-loader.c
+++ b/scripts/imx/imx-usb-loader.c
@@ -72,11 +72,11 @@ struct usb_work {
};
struct usb_id {
- struct mach_id *mach_id;
+ const struct mach_id *mach_id;
struct usb_work *work;
};
-struct mach_id imx_ids[] = {
+static const struct mach_id imx_ids[] = {
{
.vid = 0x066f,
.pid = 0x3780,
@@ -156,6 +156,13 @@ struct mach_id imx_ids[] = {
.header_type = HDR_MX53,
.mode = MODE_HID,
.max_transfer = 1024,
+ }, {
+ .vid = 0x15a2,
+ .pid = 0x0076,
+ .name = "i.MX7S",
+ .header_type = HDR_MX53,
+ .mode = MODE_HID,
+ .max_transfer = 1024,
},
};
@@ -174,12 +181,12 @@ struct sdp_command {
uint8_t rsvd;
} __attribute__((packed));
-static struct mach_id *imx_device(unsigned short vid, unsigned short pid)
+static const struct mach_id *imx_device(unsigned short vid, unsigned short pid)
{
int i;
for (i = 0; i < ARRAY_SIZE(imx_ids); i++) {
- struct mach_id *id = &imx_ids[i];
+ const struct mach_id *id = &imx_ids[i];
if (id->vid == vid && id->pid == pid) {
fprintf(stderr, "found %s USB device [%04x:%04x]\n",
id->name, vid, pid);
@@ -190,10 +197,10 @@ static struct mach_id *imx_device(unsigned short vid, unsigned short pid)
return NULL;
}
-static libusb_device *find_imx_dev(libusb_device **devs, struct mach_id **pp_id)
+static libusb_device *find_imx_dev(libusb_device **devs, const struct mach_id **pp_id)
{
int i = 0;
- struct mach_id *p;
+ const struct mach_id *p;
for (;;) {
struct libusb_device_descriptor desc;
@@ -1288,7 +1295,7 @@ static void usage(const char *prgname)
int main(int argc, char *argv[])
{
- struct mach_id *mach;
+ const struct mach_id *mach;
libusb_device **devs;
libusb_device *dev;
int r;
diff --git a/scripts/imx/imx.c b/scripts/imx/imx.c
index bf3a42fb29..809d8a7f71 100644
--- a/scripts/imx/imx.c
+++ b/scripts/imx/imx.c
@@ -231,6 +231,7 @@ static struct soc_type socs[] = {
{ .name = "imx51", .header_version = 1, .cpu_type = IMX_CPU_IMX51 },
{ .name = "imx53", .header_version = 2, .cpu_type = IMX_CPU_IMX53 },
{ .name = "imx6", .header_version = 2, .cpu_type = IMX_CPU_IMX6 },
+ { .name = "imx7", .header_version = 2, .cpu_type = IMX_CPU_IMX7 },
{ .name = "vf610", .header_version = 2, .cpu_type = IMX_CPU_VF610 },
};