瀏覽代碼

efDataPreprocessing normalDataOperation.c 庞乐 commit at 2021-03-09

庞乐 4 年之前
父節點
當前提交
eae4689785
共有 1 個文件被更改,包括 44 次插入0 次删除
  1. 44 0
      efDataPreprocessing/databaseOperation/normalDataOperation.c

+ 44 - 0
efDataPreprocessing/databaseOperation/normalDataOperation.c

@@ -300,3 +300,47 @@ static struct clk pck0 = {
 static struct clk pck1 = {
 	.name		= "pck1",
 	.pmc_mask	= AT91_PMC_PCK1,
+	.type		= CLK_TYPE_PROGRAMMABLE,
+	.id		= 1,
+};
+
+static void __init at91sam9g45_register_clocks(void)
+{
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
+		clk_register(periph_clocks[i]);
+
+	clkdev_add_table(periph_clocks_lookups,
+			 ARRAY_SIZE(periph_clocks_lookups));
+	clkdev_add_table(usart_clocks_lookups,
+			 ARRAY_SIZE(usart_clocks_lookups));
+
+	if (cpu_is_at91sam9m10() || cpu_is_at91sam9m11())
+		clk_register(&vdec_clk);
+
+	clk_register(&pck0);
+	clk_register(&pck1);
+}
+
+/* --------------------------------------------------------------------
+ *  GPIO
+ * -------------------------------------------------------------------- */
+
+static struct at91_gpio_bank at91sam9g45_gpio[] __initdata = {
+	{
+		.id		= AT91SAM9G45_ID_PIOA,
+		.regbase	= AT91SAM9G45_BASE_PIOA,
+	}, {
+		.id		= AT91SAM9G45_ID_PIOB,
+		.regbase	= AT91SAM9G45_BASE_PIOB,
+	}, {
+		.id		= AT91SAM9G45_ID_PIOC,
+		.regbase	= AT91SAM9G45_BASE_PIOC,
+	}, {
+		.id		= AT91SAM9G45_ID_PIODE,
+		.regbase	= AT91SAM9G45_BASE_PIOD,
+	}, {
+		.id		= AT91SAM9G45_ID_PIODE,
+		.regbase	= AT91SAM9G45_BASE_PIOE,
+	}