|
@@ -128,3 +128,107 @@ static struct mtd_partition assabet_partitions[] = {
|
|
|
}
|
|
|
};
|
|
|
#endif
|
|
|
+
|
|
|
+static struct flash_platform_data assabet_flash_data = {
|
|
|
+ .map_name = "cfi_probe",
|
|
|
+ .parts = assabet_partitions,
|
|
|
+ .nr_parts = ARRAY_SIZE(assabet_partitions),
|
|
|
+};
|
|
|
+
|
|
|
+static struct resource assabet_flash_resources[] = {
|
|
|
+ DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M),
|
|
|
+ DEFINE_RES_MEM(SA1100_CS1_PHYS, SZ_32M),
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+/*
|
|
|
+ * Assabet IrDA support code.
|
|
|
+ */
|
|
|
+
|
|
|
+static int assabet_irda_set_power(struct device *dev, unsigned int state)
|
|
|
+{
|
|
|
+ static unsigned int bcr_state[4] = {
|
|
|
+ ASSABET_BCR_IRDA_MD0,
|
|
|
+ ASSABET_BCR_IRDA_MD1|ASSABET_BCR_IRDA_MD0,
|
|
|
+ ASSABET_BCR_IRDA_MD1,
|
|
|
+ 0
|
|
|
+ };
|
|
|
+
|
|
|
+ if (state < 4) {
|
|
|
+ state = bcr_state[state];
|
|
|
+ ASSABET_BCR_clear(state ^ (ASSABET_BCR_IRDA_MD1|
|
|
|
+ ASSABET_BCR_IRDA_MD0));
|
|
|
+ ASSABET_BCR_set(state);
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static void assabet_irda_set_speed(struct device *dev, unsigned int speed)
|
|
|
+{
|
|
|
+ if (speed < 4000000)
|
|
|
+ ASSABET_BCR_clear(ASSABET_BCR_IRDA_FSEL);
|
|
|
+ else
|
|
|
+ ASSABET_BCR_set(ASSABET_BCR_IRDA_FSEL);
|
|
|
+}
|
|
|
+
|
|
|
+static struct irda_platform_data assabet_irda_data = {
|
|
|
+ .set_power = assabet_irda_set_power,
|
|
|
+ .set_speed = assabet_irda_set_speed,
|
|
|
+};
|
|
|
+
|
|
|
+static struct ucb1x00_plat_data assabet_ucb1x00_data = {
|
|
|
+ .reset = assabet_ucb1x00_reset,
|
|
|
+ .gpio_base = -1,
|
|
|
+};
|
|
|
+
|
|
|
+static struct mcp_plat_data assabet_mcp_data = {
|
|
|
+ .mccr0 = MCCR0_ADM,
|
|
|
+ .sclk_rate = 11981000,
|
|
|
+ .codec_pdata = &assabet_ucb1x00_data,
|
|
|
+};
|
|
|
+
|
|
|
+static void assabet_lcd_set_visual(u32 visual)
|
|
|
+{
|
|
|
+ u_int is_true_color = visual == FB_VISUAL_TRUECOLOR;
|
|
|
+
|
|
|
+ if (machine_is_assabet()) {
|
|
|
+#if 1 // phase 4 or newer Assabet's
|
|
|
+ if (is_true_color)
|
|
|
+ ASSABET_BCR_set(ASSABET_BCR_LCD_12RGB);
|
|
|
+ else
|
|
|
+ ASSABET_BCR_clear(ASSABET_BCR_LCD_12RGB);
|
|
|
+#else
|
|
|
+ // older Assabet's
|
|
|
+ if (is_true_color)
|
|
|
+ ASSABET_BCR_clear(ASSABET_BCR_LCD_12RGB);
|
|
|
+ else
|
|
|
+ ASSABET_BCR_set(ASSABET_BCR_LCD_12RGB);
|
|
|
+#endif
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+#ifndef ASSABET_PAL_VIDEO
|
|
|
+static void assabet_lcd_backlight_power(int on)
|
|
|
+{
|
|
|
+ if (on)
|
|
|
+ ASSABET_BCR_set(ASSABET_BCR_LIGHT_ON);
|
|
|
+ else
|
|
|
+ ASSABET_BCR_clear(ASSABET_BCR_LIGHT_ON);
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+ * Turn on/off the backlight. When turning the backlight on, we wait
|
|
|
+ * 500us after turning it on so we don't cause the supplies to droop
|
|
|
+ * when we enable the LCD controller (and cause a hard reset.)
|
|
|
+ */
|
|
|
+static void assabet_lcd_power(int on)
|
|
|
+{
|
|
|
+ if (on) {
|
|
|
+ ASSABET_BCR_set(ASSABET_BCR_LCD_ON);
|
|
|
+ udelay(500);
|
|
|
+ } else
|
|
|
+ ASSABET_BCR_clear(ASSABET_BCR_LCD_ON);
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+ * The assabet uses a sharp LQ039Q2DS54 LCD module. It is actually
|