Age Message
12 years 1 month Merge branch 'jz-2.6.35' of into jz-2.6.35
13 years 15 days MIPS: JZ4740: A320: Removed part of command line that disables DMA in USB gadget driver.

The DMA was disabled by booboo to work around a bug where the USB connection would get stuck once in a while.
This bug may no longer be present in the latest kernel; I am removing the workaround so we can test this.
In a quick test I did not find any problems.
Also it seems that Qi Hardware are not using the workaround.
13 years 16 days MIPS: JZ4740: A320: Disabled various config options.

I think we do not need any of these and disabling them reduces the kernel size by over 50K.
13 years 16 days MIPS: JZ4740: A320: Switch rootfs from romfs to squashfs.

The compression made the image about 40% smaller. Also loading speed improved by about 20%, probably because less data has to be loaded from the SD card and the time saved there is more than the time spent on decompression.
We are using gzip compression rather than lzma compression: the lzma image was about 15% smaller than the gzip image, but loading took over twice as long.
The benchmark used was copying /usr/lib to /tmp with the CPU clocked at 408 MHz.
13 years 17 days Squashfs: Make unlzma available to non initramfs/initrd code

Add a config option DECOMPRESS_LZMA_NEEDED which allows subsystems to
specify they need the unlzma code. Normally decompress_unlzma.c is
compiled with __init and unlzma is not exported to modules.

Signed-off-by: Phillip Lougher <>
Commit 330dac38a67f65ba7d0ee6f6ba88ca373c936b22, by Phillip Lougher
13 years 17 days Squashfs: add LZMA compression

Add support for LZMA compressed filesystems. This is an initial

Signed-off-by: Phillip Lougher <>
Commit 45c3204b42c8333664975ab15c3cd9438754fe94, by Phillip Lougher
13 years 17 days MIPS: JZ4740: A320: Declare power slider as wakeup button.

This instructs the gpio-keys driver to leave the interrupt for this key on in suspend mode.
That way, the key can be used to wake up from sleep mode.
13 years 17 days MIPS: JZ4740: A320: Reformatted gpio keys table.

The table was already more than 80 characters wide and more fields have to be added to it.
No functional changes.
13 years 20 days MIPS: JZ4740: A320: Disable /dev/mem and /dev/kmem.

Multiple reasons:
- avoids CPU frequency setting via /dev/mem conflicting with the kernel's frequency setting (cpufreq and other drivers)
- blocks dirty ports from attempting to write GP2X registers on a Dingoo (there is at least one such port out there)
- makes the kernel 1.3K smaller
13 years 20 days /dev/mem: Add kernel config option to omit this device.

Omitting this device prevents software from accessing the hardware directly, which can cause trouble if the kernel accesses the same hardware.
It also saves some space on embedded systems.
13 years 20 days MIPS: JZ4740: Round PLL frequency down to a multiple of 24 MHz.

This is required to make the color encoding of the TV-out signal work on the Dingoo.
However, clock.c should not contain Dingoo specific code, but that's something to solve later.
13 years 29 days Replace/remove SOC_JZ4740 from Kconfigs.

The closest alternative is MACH_JZ4740.
13 years 28 days MIPS: JZ4740: A320: Added PCM device to board support file.

Now audio works again.
13 years 28 days MIPS: JZ4740: A320: Updated for ramzswap -> zram rename.
13 years 3 months Staging: zram: fix build errors, depends on BLOCK

Fix 49 zram build errors in one swoop. Examples:

drivers/staging/zram/zram_drv.c:225: error: dereferencing pointer to incomplete type
drivers/staging/zram/zram_drv.c:226: error: implicit declaration of function 'bio_for_each_segment'
drivers/staging/zram/zram_drv.c:226: error: expected ';' before '{' token
drivers/staging/zram/zram_drv.c:281: error: implicit declaration of function 'bio_endio'
drivers/staging/zram/zram_drv.c:285: error: implicit declaration of function 'bio_io_error'
drivers/staging/zram/zram_drv.c:545: error: implicit declaration of function 'set_capacity'
drivers/staging/zram/zram_drv.c:548: error: implicit declaration of function 'queue_flag_set_unlocked'
drivers/staging/zram/zram_drv.c:548: error: 'QUEUE_FLAG_NONROT' undeclared (first use in this function)
drivers/staging/zram/zram_drv.c:548: error: dereferencing pointer to incomplete type

Signed-off-by: Randy Dunlap <>
Cc: Nitin Gupta <>
Signed-off-by: Greg Kroah-Hartman <>
13 years 4 months Rename ramzswap to zram in documentation

Related changes:
- Included example to show usage as generic
(non-swap) disk with ext4 filesystem.
- Renamed rzscontrol to zramconfig to match
with new device naming.

Signed-off-by: Nitin Gupta <>
13 years 4 months Rename ramzswap to zram in code

Automated renames in code:
- rzs* -> zram*
- RZS* -> ZRAM*
- ramzswap* -> zram*

Manual changes:
- Edited comments/messages mentioning "swap"

Signed-off-by: Nitin Gupta <>
13 years 4 months Rename ramzswap files to zram

Related changes:
- Modify revelant Kconfig and Makefile accordingly.
- Change include filenames in code.
- Remove dependency on CONFIG_SWAP in Kconfig as zram usage
is no longer limited to swap disks.

Signed-off-by: Nitin Gupta <>
13 years 4 months Support generic I/O requests

Currently, ramzwap devices (/dev/ramzswapX) can only
be used as swap disks since it was hard-coded to consider
only the first request in bio vector.

Now, we iterate over all the segments in an incoming
bio which allows us to handle all kinds of I/O requests.

ramzswap devices can still handle PAGE_SIZE aligned and
multiple of PAGE_SIZE sized I/O requests only. To ensure
that we get always get such requests only, we set following
request_queue attributes to PAGE_SIZE:
- physical_block_size
- logical_block_size
- io_min
- io_opt

Note: physical and logical block sizes were already set
equal to PAGE_SIZE and that seems to be sufficient to get
PAGE_SIZE aligned I/O.

Since we are no longer limited to handling swap requests
only, the next few patches rename ramzswap to zram. So,
the devices will then be called /dev/zram{0, 1, 2, ...}

1) Use as /tmp storage
- mkfs.ext4 /dev/zram0
- mount /dev/zram0 /tmp

2) Use as swap:
- mkswap /dev/zram0
- swapon /dev/zram0 -p 10 # give highest priority to zram0


- I/O benchamark done with 'dd' command. Details can be
found here:
- Maximum read speed (approx):
- ram disk: 1200 MB/sec
- zram disk: 600 MB/sec
- Maximum write speed (approx):
- ram disk: 500 MB/sec
- zram disk: 160 MB/sec


- Double caching: We can potentially waste memory by having
two copies of a page -- one in page cache (uncompress) and
second in the device memory (compressed). However, during
reclaim, clean page cache pages are quickly freed, so this
does not seem to be a big problem.

- Stale data: Not all filesystems support issuing 'discard'
requests to underlying block devices. So, if such filesystems
are used over zram devices, we can accumulate lot of stale
data in memory. Even for filesystems to do support discard
(example, ext4), we need to see how effective it is.

- Scalability: There is only one (per-device) de/compression
buffer stats. This can lead to significant contention, especially
when used for generic (non-swap) purposes.

Signed-off-by: Nitin Gupta <>
13 years 28 days MIPS: JZ4740: A320: Take advantage of 72-byte eccpos.

Expanding eccpos to 72 bytes is a cleaner solution than the workaround used in jz-2.6.34.
13 years 28 days MTD: JZ4740: Expand eccpos to 72 bytes.

This is required to support 4K pages: 8*9 byte ECC for 8*512 byte data.
13 years 28 days MIPS: jz4740: platform.c: Add memory region for NAND banks

Based on 2.6.34 commit from Lars-Peter Clausen.
13 years 28 days MIPS: JZ4740: SLCD: Fix bytes per frame for TV-out.

To support double buffering, video memory is allocated for two frames, but only one frame should be uploaded to the LCD controller when using TV-out.

Note that this does not add support for double buffering when using TV-out, it only fixes single buffering.
13 years 28 days MIPS: JZ4740: a320_defconfig: Default config for Dingoo A320.

This is the config from the jz-2.6.34 branch brought up to date for 2.6.35.
13 years 28 days MIPS: JZ4740: Updated board support for Dingoo A320.

Updated to new device names.
Removed init calls that are no longer necessary.
Removed unnecessary code, most of which was already commented out.