Changeset 3887
- Timestamp:
- 01/21/08 02:33:31 (5 years ago)
- Location:
- branches/src/target/kernel/2.6.24.x/patches
- Files:
-
- 2 edited
-
gta02-core.patch (modified) (6 diffs)
-
smedia-glamo.patch (modified) (21 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
r3849 r3887 3 3 --- /dev/null 4 4 +++ linux-2.6.24-rc7/arch/arm/mach-s3c2440/mach-gta02.c 5 @@ -0,0 +1, 753@@5 @@ -0,0 +1,821 @@ 6 6 +/* 7 7 + * linux/arch/arm/mach-s3c2440/mach-gta02.c … … 237 237 +}; 238 238 + 239 +#if 0 /* currently unused */ 239 240 +static void cfg_pmu_vrail(struct pmu_voltage_rail *vrail, char *name, 240 241 + unsigned int flags, unsigned int init, … … 246 247 + vrail->voltage.max = max; 247 248 +} 249 +#endif 248 250 + 249 251 +static void mangle_pmu_pdata_by_system_rev(void) … … 402 404 +}; 403 405 + 404 +static void gta02_mmc_set_power(unsigned char power_mode, unsigned short vdd)405 +{406 + printk(KERN_DEBUG "mmc_set_power(power_mode=%u, vdd=%u\n",407 + power_mode, vdd);408 +409 + switch (system_rev) {410 + case GTA02v1_SYSTEM_REV:411 + case GTA02v2_SYSTEM_REV:412 + case GTA02v3_SYSTEM_REV:413 + case GTA02v4_SYSTEM_REV:414 + /* FIXME */415 + break;416 + }417 +}418 +419 406 +static struct s3c24xx_mci_pdata gta02_mmc_cfg = { 420 407 + .gpio_detect = GTA02v1_GPIO_nSD_DETECT, 421 + .set_power = >a02_mmc_set_power,408 + .set_power = NULL, 422 409 + .ocr_avail = MMC_VDD_32_33, 423 410 +}; … … 576 563 + }, 577 564 +}; 565 + 566 +static int glamo_irq_is_wired(void) 567 +{ 568 + int rc; 569 + int count = 0; 570 + 571 + /* 572 + * GTA02 S-Media IRQs prior to A5 are broken due to a lack of 573 + * a pullup on the INT# line. Check for the bad behaviour. 574 + */ 575 + s3c2410_gpio_setpin(S3C2410_GPG4, 0); 576 + s3c2410_gpio_cfgpin(S3C2410_GPG4, S3C2410_GPG4_OUTP); 577 + s3c2410_gpio_cfgpin(S3C2410_GPG4, S3C2410_GPG4_INP); 578 + /* 579 + * we force it low ourselves for a moment and resume being input. 580 + * If there is a pullup, it won't stay low for long. But if the 581 + * level converter is there as on < A5 revision, the weak keeper 582 + * on the input of the LC will hold the line low indefinitiely 583 + */ 584 + do 585 + rc = s3c2410_gpio_getpin(S3C2410_GPG4); 586 + while ((!rc) && ((count++) < 10)); 587 + if (rc) { /* it got pulled back up, it's good */ 588 + printk(KERN_INFO "Detected S-Media IRQ# pullup, " 589 + "enabling interrupt\n"); 590 + return 0; 591 + } else /* Gah we can't work with this level converter */ 592 + printk(KERN_WARNING "** Detected bad IRQ# circuit found" 593 + " on pre-A5 GTA02: S-Media interrupt disabled **\n"); 594 + return -ENODEV; 595 +} 596 + 597 + 598 +static void 599 +gta02_glamo_mmc_set_power(unsigned char power_mode, unsigned short vdd) 600 +{ 601 + int mv = 1650; 602 + 603 + printk(KERN_DEBUG "mmc_set_power(power_mode=%u, vdd=%u\n", 604 + power_mode, vdd); 605 + 606 + switch (system_rev) { 607 + case GTA02v1_SYSTEM_REV: 608 + case GTA02v2_SYSTEM_REV: 609 + break; 610 + case GTA02v3_SYSTEM_REV: 611 + case GTA02v4_SYSTEM_REV: 612 +/* case GTA02v5_SYSTEM_REV: */ 613 + /* depend on pcf50633 driver init */ 614 + if (!pcf50633_global) 615 + while (!pcf50633_global) 616 + msleep(10); 617 + switch (power_mode) { 618 + case MMC_POWER_ON: 619 + case MMC_POWER_UP: 620 + /* select and set the voltage */ 621 + if (vdd > 7) { 622 + mv += 300 + 100 * (vdd - 8); 623 + if (mv > 3500) 624 + mv = 3500; 625 + } 626 + pcf50633_voltage_set(pcf50633_global, 627 + PCF50633_REGULATOR_HCLDO, mv); 628 + msleep(10); 629 + pcf50633_onoff_set(pcf50633_global, 630 + PCF50633_REGULATOR_HCLDO, 1); 631 + msleep(1); 632 + break; 633 + case MMC_POWER_OFF: 634 + pcf50633_onoff_set(pcf50633_global, 635 + PCF50633_REGULATOR_HCLDO, 0); 636 + msleep(1); 637 + break; 638 + } 639 + break; 640 + } 641 +} 578 642 + 579 643 +/* Smedia Glamo 3362 */ … … 607 671 + //.spi_info = &glamo_spi_cfg, 608 672 + .spigpio_info = &glamo_spigpio_cfg, 673 + 674 + /* glamo MMC function platform data */ 675 + .glamo_set_mci_power = gta02_glamo_mmc_set_power, 676 + .glamo_irq_is_wired = glamo_irq_is_wired, 609 677 +}; 610 678 + -
branches/src/target/kernel/2.6.24.x/patches/smedia-glamo.patch
r3862 r3887 519 519 --- /dev/null 520 520 +++ linux-2.6.24-rc7/drivers/mfd/glamo/glamo-core.c 521 @@ -0,0 +1,1 113@@521 @@ -0,0 +1,1097 @@ 522 522 +/* Smedia Glamo 336x/337x driver 523 523 + * … … 560 560 +#include <linux/spinlock.h> 561 561 +#include <linux/glamofb.h> 562 +#include <linux/mmc/mmc.h> 563 +#include <linux/mmc/host.h> 562 564 + 563 565 +#include <asm/io.h> … … 571 573 +#include "glamo-regs.h" 572 574 +#include "glamo-core.h" 573 +574 +#ifndef UGLY_HACK_BE_GONE575 +#ifdef CONFIG_MACH_NEO1973_GTA02576 +#include <asm/arch/gpio.h>577 +#include <asm/arch/regs-gpio.h>578 +#include <asm/arch/regs-gpioj.h>579 +#endif580 +#endif /* UGLY_HACK_BE_GONE */581 575 + 582 576 +#define RESSIZE(ressource) (((ressource)->end - (ressource)->start)+1) … … 676 670 +#endif 677 671 + 678 +static struct resource glamo_mmc_resources[] = {679 + {680 + /* FIXME: those need to be incremented by parent base */681 + .start = GLAMO_REGOFS_MMC,682 + .end = GLAMO_REGOFS_MPROC0 - 1,683 + .flags = IORESOURCE_MEM684 + }, {685 + .start = IRQ_GLAMO_MMC,686 + .end = IRQ_GLAMO_MMC,687 + .flags = IORESOURCE_IRQ,688 + },689 +};690 +691 +static struct platform_device glamo_mmc_dev = {692 + .name = "glamo-mmc",693 + .resource = glamo_mmc_resources,694 + .num_resources = ARRAY_SIZE(glamo_mmc_resources),695 +};696 +697 672 +static struct resource glamo_jpeg_resources[] = { 698 673 + { … … 766 741 + .name = "glamo-spi-gpio", 767 742 +}; 768 +769 +/* for the time being, we put the on-screen framebuffer into the lowest770 + * VRAM space. This should make the code easily compatible with the various771 + * 2MB/4MB/8MB variants of the Smedia chips */772 +#define GLAMO_OFFSET_VRAM 0x800000773 +#define GLAMO_OFFSET_FB (GLAMO_OFFSET_VRAM)774 +775 +/* we only allocate the minimum possible size for the framebuffer to make776 + * sure we have sufficient memory for other functions of the chip */777 +/*#define GLAMO_FB_SIZE (640*480*4)*/ /* == 0x12c000 */778 +#define GLAMO_FB_SIZE 0x800000779 743 + 780 744 +static struct resource glamo_fb_resources[] = { … … 798 762 + .num_resources = ARRAY_SIZE(glamo_fb_resources), 799 763 +}; 764 + 765 +static struct resource glamo_mmc_resources[] = { 766 + { 767 + /* FIXME: those need to be incremented by parent base */ 768 + .start = GLAMO_REGOFS_MMC, 769 + .end = GLAMO_REGOFS_MPROC0 - 1, 770 + .flags = IORESOURCE_MEM 771 + }, { 772 + .start = IRQ_GLAMO_MMC, 773 + .end = IRQ_GLAMO_MMC, 774 + .flags = IORESOURCE_IRQ, 775 + }, { /* our data buffer for MMC transfers */ 776 + .start = GLAMO_OFFSET_FB + GLAMO_FB_SIZE, 777 + .end = GLAMO_OFFSET_FB + GLAMO_FB_SIZE + 778 + GLAMO_MMC_BUFFER_SIZE - 1, 779 + .flags = IORESOURCE_MEM 780 + }, 781 +}; 782 + 783 +static struct platform_device glamo_mmc_dev = { 784 + .name = "glamo-mci", 785 + .resource = glamo_mmc_resources, 786 + .num_resources = ARRAY_SIZE(glamo_mmc_resources), 787 +}; 788 + 789 +struct glamo_mci_pdata glamo_mci_def_pdata = { 790 + .gpio_detect = 0, 791 + .glamo_set_mci_power = NULL, /* filled in from MFD platform data */ 792 + .ocr_avail = MMC_VDD_32_33, 793 + .glamo_irq_is_wired = NULL, /* filled in from MFD platform data */ 794 +}; 795 +EXPORT_SYMBOL_GPL(glamo_mci_def_pdata); 796 + 797 + 800 798 + 801 799 +static void mangle_mem_resources(struct resource *res, int num_res, … … 951 949 + break; 952 950 + /* FIXME: Implementation */ 951 + default: 952 + break; 953 953 + } 954 954 + spin_unlock(&glamo->lock); … … 1083 1083 + if (val) { 1084 1084 + val--; 1085 + printk(KERN_INFO "-------------- engine reclock val = %d\n", val);1086 1085 + reg_set_bit_mask(glamo, reg, mask, val); 1087 1086 + msleep(5); /* wait some time to stabilize */ … … 1126 1125 + { GLAMO_REG_CLOCK_MMC, 0x1000 }, 1127 1126 + { GLAMO_REG_CLOCK_ISP, 0x1000 }, 1128 + { GLAMO_REG_CLOCK_ISP, 0x 2000 },1127 + { GLAMO_REG_CLOCK_ISP, 0x3000 }, 1129 1128 + { GLAMO_REG_CLOCK_JPEG, 0x1000 }, 1130 1129 + { GLAMO_REG_CLOCK_3D, 0x1000 }, 1131 + { GLAMO_REG_CLOCK_3D, 0x 2000 },1130 + { GLAMO_REG_CLOCK_3D, 0x3000 }, 1132 1131 + { GLAMO_REG_CLOCK_2D, 0x1000 }, 1133 + { GLAMO_REG_CLOCK_2D, 0x 2000 },1132 + { GLAMO_REG_CLOCK_2D, 0x3000 }, 1134 1133 + { GLAMO_REG_CLOCK_RISC1, 0x1000 }, 1135 1134 + { GLAMO_REG_CLOCK_MPEG, 0x3000 }, 1136 1135 + { GLAMO_REG_CLOCK_MPEG, 0x3000 }, 1137 + { GLAMO_REG_CLOCK_MPROC, 0x100 f},1136 + { GLAMO_REG_CLOCK_MPROC, 0x1000 }, 1138 1137 + { 0xfffe, 1 }, 1139 1138 + { GLAMO_REG_CLOCK_HOST, 0x0000 }, 1140 1139 + { GLAMO_REG_CLOCK_MEMORY, 0x0000 }, 1141 + { GLAMO_REG_CLOCK_MEMORY, 0x0000 },1142 1140 + { GLAMO_REG_CLOCK_LCD, 0x0000 }, 1143 1141 + { GLAMO_REG_CLOCK_MMC, 0x0000 }, 1144 +// { GLAMO_REG_CLOCK_ISP, 0x0000 }, 1145 +// { GLAMO_REG_CLOCK_ISP, 0x0000 }, 1146 +// { GLAMO_REG_CLOCK_JPEG, 0x0000 }, 1147 +// { GLAMO_REG_CLOCK_3D, 0x0000 }, 1148 +// { GLAMO_REG_CLOCK_3D, 0x0000 }, 1142 +#if 0 1143 +/* unused engines must be left in reset to stop MMC block read "blackouts" */ 1144 + { GLAMO_REG_CLOCK_ISP, 0x0000 }, 1145 + { GLAMO_REG_CLOCK_ISP, 0x0000 }, 1146 + { GLAMO_REG_CLOCK_JPEG, 0x0000 }, 1147 + { GLAMO_REG_CLOCK_3D, 0x0000 }, 1148 + { GLAMO_REG_CLOCK_3D, 0x0000 }, 1149 1149 + { GLAMO_REG_CLOCK_2D, 0x0000 }, 1150 1150 + { GLAMO_REG_CLOCK_2D, 0x0000 }, 1151 + //{ GLAMO_REG_CLOCK_RISC1, 0x0000 },1152 + //{ GLAMO_REG_CLOCK_MPEG, 0x0000 },1153 + //{ GLAMO_REG_CLOCK_MPEG, 0x0000 },1154 + { GLAMO_REG_CLOCK_MPROC, 0x000 f},1151 + { GLAMO_REG_CLOCK_RISC1, 0x0000 }, 1152 + { GLAMO_REG_CLOCK_MPEG, 0x0000 }, 1153 + { GLAMO_REG_CLOCK_MPEG, 0x0000 }, 1154 + { GLAMO_REG_CLOCK_MPROC, 0x0000 }, 1155 1155 + { 0xfffe, 1 }, 1156 +#endif 1156 1157 + { GLAMO_REG_PLL_GEN1, 0x05db }, /* 48MHz */ 1157 1158 + { GLAMO_REG_PLL_GEN3, 0x09c3 }, /* 80MHz */ 1158 + { 0xfffe, 300 }, 1159 + { GLAMO_REG_IRQ_ENABLE, 0x01ff }, /* all 9 irqs, irq to base */ 1159 + { 0xfffe, 30 }, 1160 + /* 1161 + * b9 of this register MUST be zero to get any interrupts on INT# 1162 + * the other set bits enable all the engine interrupt sources 1163 + */ 1164 + { GLAMO_REG_IRQ_ENABLE, 0x01ff }, 1160 1165 + { GLAMO_REG_CLOCK_GEN6, 0x2000 }, 1161 1166 + { GLAMO_REG_CLOCK_GEN7, 0x0101 }, 1162 1167 + { GLAMO_REG_CLOCK_GEN8, 0x0100 }, 1163 1168 + { GLAMO_REG_CLOCK_HOST, 0x000d }, 1164 + { 0x200, 0x0 ef0},1165 + { 0x202, 0x0 7ff},1169 + { 0x200, 0x0cf0 /* 0x0ef0 */ }, 1170 + { 0x202, 0x0298 /* 0x07ff */ }, 1166 1171 + { 0x212, 0x0000 }, 1167 1172 + { 0x214, 0x4000 }, 1168 1173 + { 0x216, 0xf00e }, 1169 + { GLAMO_REG_MEM_TYPE, 0x0874 }, 1170 + { GLAMO_REG_MEM_GEN, 0xafaf }, 1171 + { GLAMO_REG_MEM_TIMING1, 0x0108 }, 1172 + { GLAMO_REG_MEM_TIMING2, 0x0010 }, 1174 + { GLAMO_REG_MEM_TYPE, 0x0874 }, /* 8MB, 16 word pg wr+rd */ 1175 + { GLAMO_REG_MEM_GEN, 0xbfbf }, /* 63 grants min + max */ 1176 + /* 1177 + * the register below originally 0x0108 makes unreliable Glamo MMC 1178 + * write operations. Cranked to 0x05ad to add a wait state, the 1179 + * unreliability is not seen after 4GB of write / read testing 1180 + */ 1181 + { GLAMO_REG_MEM_TIMING1, 0x05ad }, 1182 + { GLAMO_REG_MEM_TIMING2, 0x0010 }, /* Taa = 3 MCLK */ 1173 1183 + { GLAMO_REG_MEM_TIMING3, 0x0000 }, 1174 + { GLAMO_REG_MEM_TIMING4, 0x0000 }, 1184 + { GLAMO_REG_MEM_TIMING4, 0x0000 }, /* CE1# delay fall/rise */ 1175 1185 + { GLAMO_REG_MEM_TIMING5, 0x0000 }, 1176 1186 + { GLAMO_REG_MEM_TIMING6, 0x0000 }, 1177 1187 + { GLAMO_REG_MEM_TIMING7, 0x0000 }, 1178 + { GLAMO_REG_MEM_TIMING8, 0x100 2},1179 + { GLAMO_REG_MEM_TIMING9, 0x600 6},1188 + { GLAMO_REG_MEM_TIMING8, 0x1000 }, 1189 + { GLAMO_REG_MEM_TIMING9, 0x6000 }, 1180 1190 + { GLAMO_REG_MEM_TIMING10, 0x00ff }, 1181 + { GLAMO_REG_MEM_TIMING11, 0x000 1},1191 + { GLAMO_REG_MEM_TIMING11, 0x0000 }, 1182 1192 + { GLAMO_REG_MEM_POWER1, 0x0020 }, 1183 1193 + { GLAMO_REG_MEM_POWER2, 0x0000 }, … … 1187 1197 + { 0xfffe, 1 }, 1188 1198 + { GLAMO_REG_MEM_DRAM1, 0xe100 }, 1189 + { GLAMO_REG_MEM_DRAM2, 0x01 d6},1190 + { GLAMO_REG_CLOCK_MEMORY, 0x000 a},1191 + // { GLAMO_REG_CLOCK_MEMORY, 0x000b },1192 + };1199 + { GLAMO_REG_MEM_DRAM2, 0x0155 }, 1200 + { GLAMO_REG_CLOCK_MEMORY, 0x000f }, 1201 +}; 1202 + 1193 1203 + 1194 1204 +#if 0 /* MM370 */ … … 1303 1313 +} 1304 1314 + 1315 +#if 0 1305 1316 +#define MEMDETECT_RETRY 6 1306 1317 +static unsigned int detect_memsize(struct glamo_core *glamo) … … 1364 1375 + return 0; 1365 1376 +} 1377 +#endif 1366 1378 + 1367 1379 +/* Find out if we can support this version of the Glamo chip */ … … 1410 1422 +{ 1411 1423 + int rc, irq; 1412 + int count = 0;1413 1424 + struct glamo_core *glamo; 1414 1425 + … … 1445 1456 + platform_device_register(&glamo_core_dev); 1446 1457 +#endif 1458 + /* only remap the generic, hostbus and memory controller registers */ 1459 + glamo->base = ioremap(glamo->mem->start, GLAMO_REGOFS_VIDCAP); 1460 + if (!glamo->base) { 1461 + dev_err(&pdev->dev, "failed to ioremap() memory region\n"); 1462 + goto out_free; 1463 + } 1464 + 1465 + /* bring MCI specific stuff over from our MFD platform data */ 1466 + glamo_mci_def_pdata.glamo_set_mci_power = 1467 + glamo->pdata->glamo_set_mci_power; 1468 + glamo_mci_def_pdata.glamo_irq_is_wired = 1469 + glamo->pdata->glamo_irq_is_wired; 1447 1470 + 1448 1471 + glamo_mmc_dev.dev.parent = &pdev->dev; 1472 + /* we need it later to give to the engine enable and disable */ 1473 + glamo_mci_def_pdata.pglamo = glamo; 1449 1474 + mangle_mem_resources(glamo_mmc_dev.resource, 1450 1475 + glamo_mmc_dev.num_resources, glamo->mem); … … 1491 1516 + } 1492 1517 + 1493 + /* only remap the generic, hostbus and memory controller registers */1494 + glamo->base = ioremap(glamo->mem->start, GLAMO_REGOFS_VIDCAP);1495 + if (!glamo->base) {1496 + dev_err(&pdev->dev, "failed to ioremap() memory region\n");1497 + goto out_free;1498 + }1499 +1500 1518 + if (!glamo_supported(glamo)) { 1501 1519 + dev_err(&pdev->dev, "This Glamo is not supported\n"); … … 1512 1530 + glamo_pll_rate(glamo, GLAMO_PLL2)); 1513 1531 + 1514 + /* FIXME: do we need to request_irq() it ? */1515 +1516 + dev_dbg(&glamo->pdev->dev, "interrupts\n");1517 1532 + for (irq = IRQ_GLAMO(0); irq <= IRQ_GLAMO(8); irq++) { 1518 1533 + set_irq_chip(irq, &glamo_irq_chip); … … 1521 1536 + } 1522 1537 + 1523 +#ifndef UGLY_HACK_BE_GONE 1524 + /* 1525 + * GTA-02 S-Media IRQs prior to A5 are broken due to a lack of 1526 + * a pullup on the INT# line. Check for the bad behaviour. 1527 + */ 1528 + s3c2410_gpio_setpin(S3C2410_GPG4, 0); 1529 + s3c2410_gpio_cfgpin(S3C2410_GPG4, S3C2410_GPG4_OUTP); 1530 + s3c2410_gpio_cfgpin(S3C2410_GPG4, S3C2410_GPG4_INP); 1531 + /* 1532 + * we force it low ourselves for a moment and resume being input. 1533 + * If there is a pullup, it won't stay low for long. But if the 1534 + * level converter is there as on < A5 revision, the weak keeper 1535 + * on the input of the LC will hold the line low indefinitiely 1536 + */ 1537 + do { 1538 + rc = s3c2410_gpio_getpin(S3C2410_GPG4); 1539 + } while ((!rc) && ((count++) < 10)); 1540 + 1541 + if (rc) { /* it got pulled back up, it's good */ 1542 + dev_info(&glamo->pdev->dev, "Detected S-Media IRQ# pullup, " 1543 + "enabling interrupt\n"); 1538 + if (glamo->pdata->glamo_irq_is_wired && 1539 + !glamo->pdata->glamo_irq_is_wired()) { 1540 + set_irq_chained_handler(glamo->irq, glamo_irq_demux_handler); 1541 + set_irq_type(glamo->irq, IRQT_FALLING); 1544 1542 + glamo->irq_works = 1; 1545 + } else { /* Gah we can't work with this level converter */ 1546 + dev_warn(&glamo->pdev->dev, "** Detected bad IRQ# circuit found" 1547 + " on pre-A5 GTA-02: S-Media interrupt disabled **\n"); 1543 + } else 1548 1544 + glamo->irq_works = 0; 1549 + }1550 +#endif /* UGLY_HACK_BE_GONE */1551 +1552 + if (!glamo->irq || !glamo->irq_works)1553 + dev_warn(&glamo->pdev->dev, "No IRQ support on this hardware!\n");1554 + else {1555 + dev_dbg(&glamo->pdev->dev, "chained\n");1556 + set_irq_chained_handler(glamo->irq, glamo_irq_demux_handler);1557 + dev_dbg(&glamo->pdev->dev, "type\n");1558 + set_irq_type(glamo->irq, IRQT_FALLING);1559 + }1560 +1561 1545 + return 0; 1562 1546 + … … 2506 2490 --- /dev/null 2507 2491 +++ linux-2.6.24-rc7/include/linux/glamofb.h 2508 @@ -0,0 +1,3 4@@2492 @@ -0,0 +1,39 @@ 2509 2493 +#ifndef _LINUX_GLAMOFB_H 2510 2494 +#define _LINUX_GLAMOFB_H … … 2535 2519 + struct glamo_spigpio_info *spigpio_info; 2536 2520 + struct glamo_core *glamo; 2521 + 2522 + /* glamo mmc platform specific info */ 2523 + void (*glamo_set_mci_power)(unsigned char power_mode, 2524 + unsigned short vdd); 2525 + int (*glamo_irq_is_wired)(void); 2537 2526 +}; 2538 2527 + … … 2578 2567 --- /dev/null 2579 2568 +++ linux-2.6.24-rc7/drivers/mfd/glamo/glamo-core.h 2580 @@ -0,0 +1, 54@@2569 @@ -0,0 +1,79 @@ 2581 2570 +#ifndef __GLAMO_CORE_H 2582 2571 +#define __GLAMO_CORE_H 2583 2572 + 2573 +/* for the time being, we put the on-screen framebuffer into the lowest 2574 + * VRAM space. This should make the code easily compatible with the various 2575 + * 2MB/4MB/8MB variants of the Smedia chips */ 2576 +#define GLAMO_OFFSET_VRAM 0x800000 2577 +#define GLAMO_OFFSET_FB (GLAMO_OFFSET_VRAM) 2578 + 2579 +/* we only allocate the minimum possible size for the framebuffer to make 2580 + * sure we have sufficient memory for other functions of the chip */ 2581 +//#define GLAMO_FB_SIZE (640*480*4) /* == 0x12c000 */ 2582 +#define GLAMO_INTERNAL_RAM_SIZE 0x800000 2583 +#define GLAMO_MMC_BUFFER_SIZE (64 * 1024) 2584 +#define GLAMO_FB_SIZE (GLAMO_INTERNAL_RAM_SIZE - GLAMO_MMC_BUFFER_SIZE) 2585 + 2586 + 2584 2587 +struct glamo_core { 2585 2588 + int irq; 2586 + int irq_works; /* 0 means PCB does not support Glamo IRQ - UGLY HACK*/2589 + int irq_works; /* 0 means PCB does not support Glamo IRQ */ 2587 2590 + struct resource *mem; 2588 2591 + struct resource *mem_core; … … 2625 2628 + __NUM_GLAMO_ENGINES 2626 2629 +}; 2630 + 2631 +struct glamo_mci_pdata { 2632 + struct glamo_core * pglamo; 2633 + unsigned int gpio_detect; 2634 + unsigned int gpio_wprotect; 2635 + unsigned long ocr_avail; 2636 + void (*glamo_set_mci_power)(unsigned char power_mode, 2637 + unsigned short vdd); 2638 + int (*glamo_irq_is_wired)(void); 2639 +}; 2640 + 2627 2641 + 2628 2642 +int glamo_engine_enable(struct glamo_core *glamo, enum glamo_engine engine);
Note: See TracChangeset
for help on using the changeset viewer.
