소스 검색

efElectricAgingTrendMining calculationAnalysisOfCablePower.c 张婷 commit at 2021-03-08

张婷 4 년 전
부모
커밋
d1929e3028
1개의 변경된 파일85개의 추가작업 그리고 0개의 파일을 삭제
  1. 85 0
      efElectricAgingTrendMining/analysisOfCableOverloadOperation/calculationAnalysisOfCablePower.c

+ 85 - 0
efElectricAgingTrendMining/analysisOfCableOverloadOperation/calculationAnalysisOfCablePower.c

@@ -675,3 +675,88 @@ static struct omap_device_pad serial2_pads[] __initdata = {
 
 static inline void board_serial_init(void)
 {
+	struct omap_board_data bdata;
+
+	bdata.flags = 0;
+	bdata.pads = NULL;
+	bdata.pads_cnt = 0;
+
+	bdata.id = 0;
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 1;
+	omap_serial_init_port(&bdata, NULL);
+
+	bdata.id = 2;
+	bdata.pads = serial2_pads;
+	bdata.pads_cnt = ARRAY_SIZE(serial2_pads);
+	omap_serial_init_port(&bdata, NULL);
+}
+
+#else
+
+static inline void board_serial_init(void)
+{
+	omap_serial_init();
+}
+
+#endif
+
+static void __init n8x0_init_machine(void)
+{
+	omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
+	/* FIXME: add n810 spi devices */
+	spi_register_board_info(n800_spi_board_info,
+				ARRAY_SIZE(n800_spi_board_info));
+	omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1,
+			      ARRAY_SIZE(n8x0_i2c_board_info_1));
+	omap_register_i2c_bus(2, 400, NULL, 0);
+	if (machine_is_nokia_n810())
+		i2c_register_board_info(2, n810_i2c_board_info_2,
+					ARRAY_SIZE(n810_i2c_board_info_2));
+	board_serial_init();
+	omap_sdrc_init(NULL, NULL);
+	gpmc_onenand_init(board_onenand_data);
+	n8x0_mmc_init();
+	n8x0_usb_init();
+	n8x0_cbus_init();
+}
+
+MACHINE_START(NOKIA_N800, "Nokia N800")
+	.atag_offset	= 0x100,
+	.reserve	= omap_reserve,
+	.map_io		= omap242x_map_io,
+	.init_early	= omap2420_init_early,
+	.init_irq	= omap2_init_irq,
+	.handle_irq	= omap2_intc_handle_irq,
+	.init_machine	= n8x0_init_machine,
+	.init_late	= omap2420_init_late,
+	.timer		= &omap2_timer,
+	.restart	= omap2xxx_restart,
+MACHINE_END
+
+MACHINE_START(NOKIA_N810, "Nokia N810")
+	.atag_offset	= 0x100,
+	.reserve	= omap_reserve,
+	.map_io		= omap242x_map_io,
+	.init_early	= omap2420_init_early,
+	.init_irq	= omap2_init_irq,
+	.handle_irq	= omap2_intc_handle_irq,
+	.init_machine	= n8x0_init_machine,
+	.init_late	= omap2420_init_late,
+	.timer		= &omap2_timer,
+	.restart	= omap2xxx_restart,
+MACHINE_END
+
+MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
+	.atag_offset	= 0x100,
+	.reserve	= omap_reserve,
+	.map_io		= omap242x_map_io,
+	.init_early	= omap2420_init_early,
+	.init_irq	= omap2_init_irq,
+	.handle_irq	= omap2_intc_handle_irq,
+	.init_machine	= n8x0_init_machine,
+	.init_late	= omap2420_init_late,
+	.timer		= &omap2_timer,
+	.restart	= omap2xxx_restart,
+MACHINE_END