|
42 | 42 |
|
43 | 43 | #define MGB4_USER_IRQS 16 |
44 | 44 |
|
| 45 | +#define DIGITEQ_VID 0x1ed8 |
| 46 | +#define T100_DID 0x0101 |
| 47 | +#define T200_DID 0x0201 |
| 48 | + |
45 | 49 | ATTRIBUTE_GROUPS(mgb4_pci); |
46 | 50 |
|
47 | 51 | static int flashid; |
@@ -151,7 +155,7 @@ static struct spi_master *get_spi_adap(struct platform_device *pdev) |
151 | 155 | return dev ? container_of(dev, struct spi_master, dev) : NULL; |
152 | 156 | } |
153 | 157 |
|
154 | | -static int init_spi(struct mgb4_dev *mgbdev) |
| 158 | +static int init_spi(struct mgb4_dev *mgbdev, u32 devid) |
155 | 159 | { |
156 | 160 | struct resource spi_resources[] = { |
157 | 161 | { |
@@ -213,8 +217,13 @@ static int init_spi(struct mgb4_dev *mgbdev) |
213 | 217 | snprintf(mgbdev->fw_part_name, sizeof(mgbdev->fw_part_name), |
214 | 218 | "mgb4-fw.%d", flashid); |
215 | 219 | mgbdev->partitions[0].name = mgbdev->fw_part_name; |
216 | | - mgbdev->partitions[0].size = 0x400000; |
217 | | - mgbdev->partitions[0].offset = 0x400000; |
| 220 | + if (devid == T200_DID) { |
| 221 | + mgbdev->partitions[0].size = 0x950000; |
| 222 | + mgbdev->partitions[0].offset = 0x1000000; |
| 223 | + } else { |
| 224 | + mgbdev->partitions[0].size = 0x400000; |
| 225 | + mgbdev->partitions[0].offset = 0x400000; |
| 226 | + } |
218 | 227 | mgbdev->partitions[0].mask_flags = 0; |
219 | 228 |
|
220 | 229 | snprintf(mgbdev->data_part_name, sizeof(mgbdev->data_part_name), |
@@ -551,7 +560,7 @@ static int mgb4_probe(struct pci_dev *pdev, const struct pci_device_id *id) |
551 | 560 | goto err_video_regs; |
552 | 561 |
|
553 | 562 | /* SPI FLASH */ |
554 | | - rv = init_spi(mgbdev); |
| 563 | + rv = init_spi(mgbdev, id->device); |
555 | 564 | if (rv < 0) |
556 | 565 | goto err_cmt_regs; |
557 | 566 |
|
@@ -666,7 +675,8 @@ static void mgb4_remove(struct pci_dev *pdev) |
666 | 675 | } |
667 | 676 |
|
668 | 677 | static const struct pci_device_id mgb4_pci_ids[] = { |
669 | | - { PCI_DEVICE(0x1ed8, 0x0101), }, |
| 678 | + { PCI_DEVICE(DIGITEQ_VID, T100_DID), }, |
| 679 | + { PCI_DEVICE(DIGITEQ_VID, T200_DID), }, |
670 | 680 | { 0, } |
671 | 681 | }; |
672 | 682 | MODULE_DEVICE_TABLE(pci, mgb4_pci_ids); |
|
0 commit comments