<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty/goldfish.c, branch v4.14</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2017-08-31T16:58:45Z</updated>
<entry>
<title>tty: goldfish: Implement support for kernel 'earlycon' parameter</title>
<updated>2017-08-31T16:58:45Z</updated>
<author>
<name>Miodrag Dinic</name>
<email>miodrag.dinic@imgtec.com</email>
</author>
<published>2017-08-29T13:53:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3840ed9548f778717aaab5eab744da798c3ea055'/>
<id>urn:sha1:3840ed9548f778717aaab5eab744da798c3ea055</id>
<content type='text'>
Add early console functionality to the Goldfish tty driver.

When 'earlycon' kernel command line parameter is used with no options,
the early console is determined by the 'stdout-path' property in device
tree's 'chosen' node. This is illustrated in the following device tree
source example:

Device tree example:

    chosen {
        stdout-path = "/goldfish_tty@1f004000";
    };

    goldfish_tty@1f004000 {
        interrupts = &lt;0xc&gt;;
        reg = &lt;0x1f004000 0x0 0x1000&gt;;
        compatible = "google,goldfish-tty";
    };

Signed-off-by: Miodrag Dinic &lt;miodrag.dinic@imgtec.com&gt;
Signed-off-by: Goran Ferenc &lt;goran.ferenc@imgtec.com&gt;
Signed-off-by: Aleksandar Markovic &lt;aleksandar.markovic@imgtec.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: goldfish: Use streaming DMA for r/w operations on Ranchu platforms</title>
<updated>2017-08-31T16:58:45Z</updated>
<author>
<name>Miodrag Dinic</name>
<email>miodrag.dinic@imgtec.com</email>
</author>
<published>2017-08-29T13:53:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7157d2be23da9f8860c69e2b79184a4e02701dad'/>
<id>urn:sha1:7157d2be23da9f8860c69e2b79184a4e02701dad</id>
<content type='text'>
Implement tty r/w operations using streaming DMA.

Goldfish tty for Ranchu platforms has been modified to use
streaming DMA mappings for read/write operations. This change
eliminates the need for snooping through the TLB in QEMU using
cpu_get_phys_page_debug() which does not guarantee that it will
return the valid va -&gt; pa mapping.

The streaming DMA mapping is implemented using dma_map_single() per
transfer, while dma_unmap_single() is used for unmapping right after
the DMA transfer.

Using DMA API is the proper way for handling r/w transfers and
makes this driver more portable, thus effectively eliminating
the need for virt_to_page() and page_to_phys() conversions.

This change does not affect the old style Goldfish tty behaviour
which is still used by the Goldfish emulator. Version register has
been added and probed to see which platform is running this driver.
Reading from the new register GOLDFISH_TTY_REG_VERSION using the
Goldfish emulator will return 0 and driver will work with virtual
addresses. Whereas if run on Ranchu it returns 1, and thus DMA is
used.

(Goldfish and Ranchu are code names for the first and the second
generation of virtual boards used by Android emulator.)

Signed-off-by: Miodrag Dinic &lt;miodrag.dinic@imgtec.com&gt;
Signed-off-by: Goran Ferenc &lt;goran.ferenc@imgtec.com&gt;
Signed-off-by: Aleksandar Markovic &lt;aleksandar.markovic@imgtec.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: goldfish: Refactor constants to better reflect their nature</title>
<updated>2017-08-31T16:58:45Z</updated>
<author>
<name>Aleksandar Markovic</name>
<email>aleksandar.markovic@imgtec.com</email>
</author>
<published>2017-08-29T13:53:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2296eee704e70dac7fef8ac13f2716e4896dd13e'/>
<id>urn:sha1:2296eee704e70dac7fef8ac13f2716e4896dd13e</id>
<content type='text'>
Classify constants GOLDFISH_TTY_xxx into two groups: command ids and
register offsets. Apply different naming for register offsets (add
'REG_' after 'GOLDFISH_TTY_' in constant names). Change implementation
to use preprocessor's '#define' statements instead of 'enum'
declaration (as this is more common way of implementation in such
cases).

This makes the driver code easier to follow and hopefully prevents
future bugs.

Signed-off-by: Miodrag Dinic &lt;miodrag.dinic@imgtec.com&gt;
Signed-off-by: Goran Ferenc &lt;goran.ferenc@imgtec.com&gt;
Signed-off-by: Aleksandar Markovic &lt;aleksandar.markovic@imgtec.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: goldfish: Fix a parameter of a call to free_irq</title>
<updated>2017-01-12T10:51:25Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2017-01-09T00:26:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1a5c2d1de7d35f5eb9793266237903348989502b'/>
<id>urn:sha1:1a5c2d1de7d35f5eb9793266237903348989502b</id>
<content type='text'>
'request_irq()' and 'free_irq()' should be called with the same dev_id.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: goldfish: support platform_device with id -1</title>
<updated>2016-03-08T00:11:14Z</updated>
<author>
<name>Greg Hackmann</name>
<email>ghackmann@google.com</email>
</author>
<published>2016-02-26T19:01:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=465893e18878e119d8d0255439fad8debbd646fd'/>
<id>urn:sha1:465893e18878e119d8d0255439fad8debbd646fd</id>
<content type='text'>
When the platform bus sets the platform_device id to -1 (PLATFORM_DEVID_NONE),
use an incrementing counter for the TTY index instead

Signed-off-by: Greg Hackmann &lt;ghackmann@google.com&gt;
Signed-off-by: Jin Qian &lt;jinqian@android.com&gt;
Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: tty: goldfish: Add device tree bindings</title>
<updated>2016-03-08T00:11:14Z</updated>
<author>
<name>Miodrag Dinic</name>
<email>miodrag.dinic@imgtec.com</email>
</author>
<published>2016-02-26T19:00:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b883eea26ccf043b608e398cf6a26231d44f5fb'/>
<id>urn:sha1:9b883eea26ccf043b608e398cf6a26231d44f5fb</id>
<content type='text'>
Enable support for registering this device using the device tree.
Device tree node example for registering Goldfish TTY device :

goldfish_tty@1f004000 {
    interrupts = &lt;0xc&gt;;
    reg = &lt;0x1f004000 0x1000&gt;;
    compatible = "google,goldfish-tty";
};

Signed-off-by: Miodrag Dinic &lt;miodrag.dinic@imgtec.com&gt;
Signed-off-by: Jin Qian &lt;jinqian@android.com&gt;
Signed-off-by: Alan &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: constify tty_port_operations structs</title>
<updated>2016-02-07T07:31:08Z</updated>
<author>
<name>Aya Mahfouz</name>
<email>mahfouz.saif.elyazal@gmail.com</email>
</author>
<published>2015-12-14T23:53:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04b757dfd26cee24bc62ed815cd87efbf10ef2fc'/>
<id>urn:sha1:04b757dfd26cee24bc62ed815cd87efbf10ef2fc</id>
<content type='text'>
Constifies tty_port_operations structures in
the tty driver since they are not modified
after their initialization.

Detected and found using Coccinelle.

Suggested-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Aya Mahfouz &lt;mahfouz.saif.elyazal@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: goldfish: Fix pointer cast for 32 bits</title>
<updated>2015-05-31T02:40:14Z</updated>
<author>
<name>Peter Senna Tschudin</name>
<email>peter.senna@gmail.com</email>
</author>
<published>2015-05-19T09:44:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=07d783fd830a49008f3b2764ae7b6033ee1bf329'/>
<id>urn:sha1:07d783fd830a49008f3b2764ae7b6033ee1bf329</id>
<content type='text'>
As the first argument of gf_write64() was of type unsigned long, and as
some calls to gf_write64() were casting the first argument from void *
to u64 the compiler and/or sparse were printing warnings for casts of
wrong sizes when compiling for i386.

This patch changes the type of the first argument of gf_write64() to
const void *, and update calls to the function. This change fixed the
warnings and allowed to remove casts from 3 calls to gf_write64().

In addition gf_write64() was renamed to gf_write_ptr() as the name was
misleading because it only writes 32 bits on 32 bit systems.

gf_write_dma_addr() was added to handle dma_addr_t values which is
used at drivers/staging/goldfish/goldfish_audio.c.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial</title>
<updated>2015-04-14T16:50:27Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-04-14T16:50:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d0bbe0dd353af9521e9d8bc5236308c677b6f62a'/>
<id>urn:sha1:d0bbe0dd353af9521e9d8bc5236308c677b6f62a</id>
<content type='text'>
Pull trivial tree from Jiri Kosina:
 "Usual trivial tree updates.  Nothing outstanding -- mostly printk()
  and comment fixes and unused identifier removals"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
  goldfish: goldfish_tty_probe() is not using 'i' any more
  powerpc: Fix comment in smu.h
  qla2xxx: Fix printks in ql_log message
  lib: correct link to the original source for div64_u64
  si2168, tda10071, m88ds3103: Fix firmware wording
  usb: storage: Fix printk in isd200_log_config()
  qla2xxx: Fix printk in qla25xx_setup_mode
  init/main: fix reset_device comment
  ipwireless: missing assignment
  goldfish: remove unreachable line of code
  coredump: Fix do_coredump() comment
  stacktrace.h: remove duplicate declaration task_struct
  smpboot.h: Remove unused function prototype
  treewide: Fix typo in printk messages
  treewide: Fix typo in printk messages
  mod_devicetable: fix comment for match_flags
</content>
</entry>
<entry>
<title>goldfish: goldfish_tty_probe() is not using 'i' any more</title>
<updated>2015-03-10T09:45:30Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2015-03-10T09:45:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e4f93e5017d9d8080bbd34db17836e090eb46fe'/>
<id>urn:sha1:0e4f93e5017d9d8080bbd34db17836e090eb46fe</id>
<content type='text'>
The only place where 'i' has been used was a dead code that
got removed by 2a2483685a9de ("goldfish: remove unreachable line
of code"). Remove the last reference to the variable as well.

Fixes: 2a2483685a9de ("goldfish: remove unreachable line of code")
Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
