]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/mpc5200.c
Clean up: Removed fake board mpc5200_midam
[lincan.git] / lincan / src / mpc5200.c
index 9371eca369e33ca39a706f76323ada5c20b059c4..4f67d2494f1be7578ee9130415950b65f042bbab 100644 (file)
@@ -137,6 +137,19 @@ int mpc5200_init_hw_data(struct candevice_t *candev)
 
        return 0;
 }
+
+/* special function for midam board */
+int mpc5200_midam_init_hw_data(struct candevice_t *candev)
+{
+       /* use same init routine */
+       mpc5200_init_hw_data(candev);
+
+       /* modify chip count */
+       candev->nr_all_chips = NR_ALL_MIDAM;
+
+       return 0;
+}
+
 int mpc5200_init_chip_data(struct candevice_t *candev, int chipnr)
 {
        mscan_fill_chipspecops(candev->chip[chipnr]);
@@ -196,6 +209,16 @@ int mpc5200_register(struct hwspecops_t *hwspecops)
        return 0;
 }
 
+int mpc5200_midam_register(struct hwspecops_t *hwspecops)
+{
+       /* use same register routine for MIDAM board */
+       mpc5200_register(hwspecops);
+
+       /* use specific init_hw_data */
+       hwspecops->init_hw_data = mpc5200_midam_init_hw_data;
+
+       return 0;
+}
 
 int mpc5200_init_device_node(struct canchip_t * chip, struct device_node * devnode)
 {